Tue, 26 Oct 2010 22:05:52 -0700, Mark Wiebe wrote:
> Because writing "arr.ravel('F')" doesn't seem as descriptive as
> "arr.ravel(order='F')", I wrote this simple patch.  I added mention of
> the order='A' parameter to a few places it is relevant as well.  Here's
> the branch on github:
> 
> http://github.com/m-paradox/numpy/compare/master...ravel_keyword_arg
> 
> Could someone review it for me?

There is the following problem:

>>> import numpy as np
>>> x=np.arange(9).reshape(3,3)
>>> x.T.flatten()
array([0, 3, 6, 1, 4, 7, 2, 5, 8])
>>> x.T.flatten(order=None)
array([0, 1, 2, 3, 4, 5, 6, 7, 8])

PyArray_OrderConverter interprets `None` as "A". However, this problem is 
already there with `reshape`, so this patch looks good to me -- fixing 
OrderConverter is a separate job.

-- 
Pauli Virtanen

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to