用法:
itemsize
memoryview 的每個元素的大小(以字節為單位):
>>> import array, struct >>> m = memoryview(array.array('H', [32000, 32001, 32002])) >>> m.itemsize 2 >>> m[0] 32000 >>> struct.calcsize('H') == m.itemsize True
相關用法
- Python memoryview.nbytes用法及代碼示例
- Python memoryview.cast用法及代碼示例
- Python memoryview.obj用法及代碼示例
- Python memoryview.hex用法及代碼示例
- Python memoryview.toreadonly用法及代碼示例
- Python memoryview.release用法及代碼示例
- Python memoryview.tolist用法及代碼示例
- Python memoryview.__eq__用法及代碼示例
- Python memoryview.tobytes用法及代碼示例
- Python memoryview()用法及代碼示例
- Python memoryview用法及代碼示例
- Python statistics median_high()用法及代碼示例
- Python statistics median_low()用法及代碼示例
- Python statistics median()用法及代碼示例
- Python statistics median_grouped()用法及代碼示例
- Python numpy ma.MaskedArray.view用法及代碼示例
- Python matplotlib.patches.Rectangle用法及代碼示例
- Python matplotlib.pyplot.step()用法及代碼示例
- Python math.cos()用法及代碼示例
- Python math.cosh()用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 memoryview.itemsize。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。