[Numpy-discussion] array, asarray as contiguous and friends

Travis Oliphant oliphant at ee.byu.edu
Fri Mar 24 11:50:04 CST 2006

Tim Hochberg wrote:

>> Please see the transpose example above.
>>> If you combine this with one other simplification: array() always 
>>> copies, we end up with a nice thin interface:
>>>    # Create a new array in 'order' order. Defaults to "C" order.
>>>    array(object, dtype=None, order="C"|"FORTRAN")
I like the order flag.  It's a relatively easy switch and one we should 
make right now.  I don't mind string constants either in this case.  

Removing the copy flag will break a lot of code because it's been around 
for a long time.  This is also not an "easy thing" to add to 
convertcode.py though I suppose 90% of the cases could be found. 

We would also have to re-write asarray to be an additional C-function to 
make it not copy but make array copy.

So, for now I'm not as enthused about that idea.


More information about the Numpy-discussion mailing list