apply_along_axis
Apply a function to 1-D slices of an array along the given axis. The function is called once for each slice, and the results are assembled into an output array. Supports arrays of any dimensionality. For ND arrays, the function iterates over all combinations of indices on dimensions other thanaxis. Any trailing arguments are forwarded to each invocation of func1d, matching NumPy’s np.apply_along_axis(func1d, axis, arr, *args). Existing 3-argument calls behave identically.
Returns:
NDArray — The result of applying func1d along the specified axis.
apply_over_axes
Apply a function repeatedly over multiple axes. After each application, the result is kept with the reduced axis preserved as a size-1 dimension, so subsequent axes remain valid.
Returns:
NDArray — The result of applying func over all specified axes.
shares_memory
Determine whether two arrays share the same underlying data buffer. Returnstrue only when the arrays definitely reference overlapping memory.
Returns:
boolean — true if both arrays share memory.
may_share_memory
Determine whether two arrays might share memory. This is a less strict check thanshares_memory — it may return true even when the arrays do not actually overlap, but it never returns false when they do.
Returns:
boolean — true if the arrays might share memory.
ndim
Return the number of dimensions of an array.
Returns:
number — The number of dimensions (axes).
shape
Return the shape of an array as a number array.
Returns:
number[] — The dimensions of the array.
size
Return the total number of elements in an array.
Returns:
number — The total number of elements (product of shape dimensions).
geterr
Get the current error handling settings for floating-point operations.object — An object with keys divide, over, under, and invalid, each set to one of 'warn', 'raise', 'ignore', or 'print'.
seterr
Set how floating-point errors are handled. Returns the previous settings so you can restore them later.
Returns:
FloatErrorState — The previous error handling settings.