On 9/5/06, Charles R Harris firstname.lastname@example.org wrote:
I am trying to write more document strings for numpy and have a question about the order keyword in tostring. The usual allowed values of this keyword are "C", "F", or None, but in the tostring method there is also the value "Any" which has the same effect as None. I wonder if the "Any" shouldn't be removed as None seems to be the preferred form in other methods. Also, the default value of order in the tostring method is "C" and it seems to me that the principal of least surprise requires None as the default so that the order of the array being converted is the default.
What is the actual order of data in memory? Is it always row major?
In : array([[1,2],[3,4]], dtype=int8, order="F").tofile('test.txt', sep=" ")
In : cat test.txt 1 2 3 4
In : array([[1,2],[3,4]], dtype=int8, order="F").tostring(order="A") Out: '\x01\x03\x02\x04'