[Numpy-discussion] ndarray.fill and ma.array.filled

Fernando Perez Fernando.Perez at colorado.edu
Thu Mar 23 09:02:06 CST 2006

Tim Hochberg wrote:

> I don't think we're in disagreement here although I'm not sure.
> I will add, on the subject of continuity, that I think there should be a 
> function 'ascontiguous' that parallels asarray, but assures that the 
> result is contiguous. Although this sometimes returns a copy, I thinks 
> that's OK since that's it's job. I would like to see all of the implicit 
> copying pushed into functions like asarray and ascontiguous.

I think we agree: something like ascontiguous() is precisely what I had in 
mind (I think that's what ravel() does today, but I'm fine if it gets a new 
name, as long as the functionality exists).  Obviously a function like this 
should explicitly (docstring) say that it does NOT make any guarantees about 
whether its return value is a view or a copy, just that it's contiguous.



More information about the Numpy-discussion mailing list