This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lgautier
Recipients lgautier
Date 2018-09-23.17:51:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The buffer protocol is accounting for the row-major or column-major arrays, and that information is shown in the attributes, `c_contiguous` and `f_contiguous` respectively, of a memoryview object.

Using the method `cast` allows one to specify a shape but does not allow
to specify whether row or column major:

# column-major 3x2 array of bytes that was serialized
b = bytearray([1,2,3,4,5,6])

mv = memoryview(b)
mv_b = mv.cast('b', shape=(3,2))

The result object is believed to be row-major and little can be done
to correct it:

>>> mv_int.c_contiguous
>>> mv_int.c_contiguous = False
AttributeError: attribute 'c_contiguous' of 'memoryview' objects is not writable
Date User Action Args
2018-09-23 17:51:38lgautiersetrecipients: + lgautier
2018-09-23 17:51:38lgautiersetmessageid: <>
2018-09-23 17:51:38lgautierlinkissue34778 messages
2018-09-23 17:51:38lgautiercreate