frlearn.array_functions.first#
- frlearn.array_functions.first(a, k: int, axis: int = -1)#
Returns the
kfirst values ofaalong the specified axis.- Parameters:
- andarray
Input array of values.
- k: int
Number of values to return. Should be a positive integer not larger than
aalongaxis.- axisint, default=-1
The axis along which values are selected.
- Returns:
- first_along_axisndarray
An array with the same shape as
a, with the specified axis reduced according to the value ofk.