[Numpy-discussion] numpy.fromfile method modification?
oliphant.travis at ieee.org
Tue Jan 17 13:49:03 CST 2006
Christopher Hanley wrote:
> Travis Oliphant wrote:
>> Yes, I think it would be possible. Please keep me informed of other
>> possible compatibility improvements.
>> Does the shape parameter just control the size of the resulting
>> array? Is it equivalent to a
>> .reshape(newshape) at the end?
> The shape parameter does control the size of the resulting array (so
> you wouldn't need any information from the existing count parameter).
> The resulting array is the equivalent of what you would get if you
> were to use the reshape method on the array currently returned by
> fromfile. I prefer to us the array.shape = (newshape) since it is an
> inplace operation instead of reshape. At least this is what I am
> doing in the pyfits port.
What do you think about the sizing paramter of Numarray? Is that
important? If so, I would suggest a wrapper function in Python that
uses the current fromfile function. We could rename the builtin to
_fromfile in that case..
More information about the Numpy-discussion