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