a :jg~ã@sHdZddlmZddlmZmZddlmZgd¢Zedƒdd„ƒZ d S) z Miscellaneous utils. é)Úasarray)Únormalize_axis_tupleÚnormalize_axis_index)Ú set_module)Ú byte_boundsrrznumpy.lib.array_utilsc Csœ|j}|dd}|d}|d}t|ƒjj}|}}|durN||j|7}nFt||ƒD]2\}} | dkrz||d| 7}qX||d| 7}qX||7}||fS)aC Returns pointers to the end-points of an array. Parameters ---------- a : ndarray Input array. It must conform to the Python-side of the array interface. Returns ------- (low, high) : tuple of 2 integers The first integer is the first byte of the array, the second integer is just past the last byte of the array. If `a` is not contiguous it will not use every byte between the (`low`, `high`) values. Examples -------- >>> I = np.eye(2, dtype='f'); I.dtype dtype('float32') >>> low, high = np.lib.array_utils.byte_bounds(I) >>> high - low == I.size*I.itemsize True >>> I = np.eye(2); I.dtype dtype('float64') >>> low, high = np.lib.array_utils.byte_bounds(I) >>> high - low == I.size*I.itemsize True ÚdatarÚstridesÚshapeNé)Z__array_interface__rZdtypeÚitemsizeÚsizeÚzip) ÚaZaiZa_dataZastridesZashapeZbytes_aZa_lowZa_highr Zstride©rúE/usr/local/lib/python3.9/site-packages/numpy/lib/_array_utils_impl.pyr s!  rN) Ú__doc__Z numpy._corerZnumpy._core.numericrrZ numpy._utilsrÚ__all__rrrrrÚs