bundles / numpy latest / numpy / lib / array_utils / byte_bounds
function
numpy.lib.array_utils:byte_bounds
source: build-install/usr/lib/python3.14/site-packages/numpy/lib/_array_utils_impl.py :11
Signature
def byte_bounds ( a ) Summary
Returns pointers to the end-points of an array.
Parameters
a: ndarrayInput array. It must conform to the Python-side of the array interface.
Returns
(low, high): tuple of 2 integersThe first integer is the first byte of the array, the second integer is just past the last byte of the array. If
ais not contiguous it will not use every byte between the (low,high) values.
Examples
import numpy as np I = np.eye(2, dtype='f'); I.dtype low, high = np.lib.array_utils.byte_bounds(I) high - low == I.size*I.itemsize I = np.eye(2); I.dtype low, high = np.lib.array_utils.byte_bounds(I) high - low == I.size*I.itemsize✓
Aliases
-
numpy.lib._array_utils_impl.byte_bounds