| and the logical array structure. | ||
|
|
||
| .. method:: tobytes() | ||
| .. method:: tobytes(order=None) |
There was a problem hiding this comment.
Should you write it as order='C'?
There was a problem hiding this comment.
Is that common practice? I'd assume that order='C' means that a function raises a TypeError with a None argument. I supported None because NumPy does, too.
OTOH NumPy also documents the function with order='C', but I assumed that was an oversight or a historical quirk.
There was a problem hiding this comment.
Ah, I didn't realize that passing None explicitly was supported.
|
|
||
| *Order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data | ||
| of the original array is converted to C or Fortran order. 'A' returns | ||
| the data in the existing order. The default order is 'C'. |
There was a problem hiding this comment.
Need a versionchanged tag for the new argument.
|
|
||
| *Order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data | ||
| of the original array is converted to C or Fortran order. 'A' returns | ||
| the data in the existing order. The default order is 'C'. |
There was a problem hiding this comment.
Rather than "existing order", I would say "physical order" (or more precisely, "'F' if the buffer is Fortran-contiguous, 'C' otherwise"?).
There was a problem hiding this comment.
Yes, let's use the more precise version. 'A' does convert non-contiguous buffers to 'C', so it should be mentioned.
|
@skrah: Please replace |
https://bugs.python.org/issue35845