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.
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.