Skip to content

Order Source

Bases: Enum

Direction of a sort.

Added in version 0.1.0

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([20, 30, 10])
prices.sort(ndp.ArraySorting(order=ndp.Order.DESCENDING))
# Array([30, 20, 10], dtype=INT64)

Attributes

ASCENDING = auto() Source

From the smallest to the largest value. Default value.

Added in version 0.1.0

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([20, 30, 10])
prices.sort(ndp.ArraySorting(order=ndp.Order.ASCENDING))
# Array([10, 20, 30], dtype=INT64)

DESCENDING = auto() Source

From the largest to the smallest value.

Added in version 0.1.0

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([20, 30, 10])
prices.sort(ndp.ArraySorting(order=ndp.Order.DESCENDING))
# Array([30, 20, 10], dtype=INT64)