numpy.byte_bounds()函數返回指向數組end-points的指針。
用法: numpy.byte_bounds(arr)
參數:
arr: [ndarray] Input array.
返回: [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 arr is not contiguous it will not use every byte between the (low, high) values.
代碼1:
# Python program explaining
# numpy.byte_bounds() function
# importing numpy as geek
import numpy as geek
arr = geek.eye(2, dtype = 'f')
gfg = geek.byte_bounds(arr)
print (gfg)
輸出:
(37062512, 37062528)
代碼2:
# Python program explaining
# numpy.byte_bounds() function
# importing numpy as geek
import numpy as geek
arr = geek.eye(2)
gfg = geek.byte_bounds(arr)
print (gfg)
輸出:
(30421344, 30421376)
相關用法
- Python Wand function()用法及代碼示例
- Python now()用法及代碼示例
- Python id()用法及代碼示例
- Python tell()用法及代碼示例
- Python sum()用法及代碼示例
- Python str()用法及代碼示例
- Python cmp()用法及代碼示例
- Python ord()用法及代碼示例
- Python dir()用法及代碼示例
- Python hex()用法及代碼示例
- Python int()用法及代碼示例
- Python map()用法及代碼示例
- Python oct()用法及代碼示例
- Python math.sin()用法及代碼示例
- Python bytearray()用法及代碼示例
- Python math.tan()用法及代碼示例
注:本文由純淨天空篩選整理自sanjoy_62大神的英文原創作品 numpy.byte_bounds() function – Python。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。