ArraySorting(order=Order.ASCENDING, missing=MissingPosition.LAST)
Source¶
Settings of the sort of an Array, used by Array.sort.
The axis, inside each row or each column, is given to Array.sort itself.
Added in version 0.1.0
Parameters:
-
order(Order, default:Order.ASCENDING)Ascending by default.
-
missing(MissingPosition, default:MissingPosition.LAST)Place of the missing values, last by default whatever the order.
Raises:
-
InvalidTypeErrorWhen a setting is not of the type its annotation names.
Examples:
import numdaplot as ndp
grid = ndp.Array.from_list([[3, 1], [2, 4]])
grid.sort(ndp.ArraySorting(order=ndp.Order.DESCENDING), axis=ndp.Axis.EACH_COLUMN)
# Array([[3, 4],
# [2, 1]], dtype=INT64)