Antoine Pitrou <pit...@free.fr> added the comment:
Well, raw_memory() would avoid a copy, which is useful. As for tobytes(), if we want to follow NumPy, we can have 'F' mean if F-contiguous, 'C' otherwise: >>> a = np.arange(12, dtype='int8').reshape((3,4)) >>> >>> a.tobytes('A') >>> b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b' >>> a.tobytes('A') == a.T.tobytes('A') >>> True ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35845> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com