Index(position)
Source¶
A single position in one dimension, used by Region.
Added in version 0.1.0
Parameters:
-
position(int)The position, starting at 0. A negative position counts from the end: -1 is the last one.
Raises:
-
InvalidTypeErrorWhen a setting is not of the type its annotation names.
Examples:
import numdaplot as ndp
scores = ndp.Array.from_list([10, 20, 30])
scores.take(ndp.Region(rows=ndp.Index(-1)))
# Array([30], dtype=INT64)