The full description of memoryview can be found here:
Create a
memoryview
that references obj. obj must support the buffer protocol. Built-in objects that support the buffer protocol includebytes
andbytearray
.A
memoryview
has the notion of an element, which is the atomic memory unit handled by the originating object obj. For many simple types such asbytes
andbytearray
, an element is a single byte, but other types such asarray.array
may have bigger elements.