[Numpy-discussion] array, asarray as contiguous and friends
Tim Hochberg
tim.hochberg at cox.net
Thu Mar 23 11:03:03 CST 2006
I was just looking at the interface for array and asarray to see what
other stuff should go in the interface of the hypothetical
ascontiguous. There's 'dtype', which I knew about, and 'fortran', which
I didn't, but which makes sense. However, there's also 'ndmin'. First
off, it's not described in docstring for asarray, but I was able to find
it in the docstring for array without a problem. Second, is it really
necessary? It seems to be useful in an awfully narrow set of
circumstances, particularly since when you are padding axes not everyone
wants to pad to the left.
It would seem to be more useful to ditch the ndmin and have some sort of
paddims function that was more full featured (padding to either the left
or the right at a minimum). I'm not entirely sure what the best
interface to such a beast would look like, but a simple tactic would be
to just provide leftpaddims and rightpaddims.
If it's not allready clear by now (;), I prefer several narrow
interfaces to one broad one.
-tim
More information about the Numpy-discussion
mailing list