memoryview

Constructors

memoryview()
Returns a new memoryview object.

Methods

tobytes
Returns the data in the buffer as a string.
tolist
Returns the data in the buffer as a list of integers.

Properties

format
Returns a string containing the format (in struct module style) for each element in the view.
itemsize
Returns the size in bytes of each element of the memoryview.
ndim
Returns an integer indicating how many dimensions of a multi-dimensional array the memory represents.
readonly
Returns a Boolean indicating whether the memory is read only.
shape
Returns a tuple of integers the length of ndim giving the shape of the memory as a N-dimensional array.
strides
Returns a tuple of integers the length of ndim giving the size in bytes to access each element for each dimension of the array.