[Numpy-discussion] More loadtxt() changes
Fri Nov 28 13:07:40 CST 2008
Give me the week-end to come up with something. What you want is
already doable with the current implementation of np.loadtxt, through
the converter keyword. Support for missing data will be covered in a
separate function, most likely to be put in numpy.ma.io at term.
On Nov 28, 2008, at 5:42 AM, Manuel Metz wrote:
> Pierre GM wrote:
>> On Nov 27, 2008, at 3:08 AM, Manuel Metz wrote:
>>> Certainly, yes! Dealing with fixed-length fields would be necessary.
>>> case I had in mind had both -- a separator ("|") __and__ fixed-
>>> fields -- and is probably very special in that sense. But such
>>> data-files exists out there...
>> Well, if you have a non-space delimiter, it doesn't matter if the
>> fields have a fixed length or not, does it? Each field is stripped
> Yes. It would already be _very_ helpful (without changing loadtxt too
> much) if the current implementation uses a converter like this
> def fval(val):
> return float(val)
> return numpy.nan
> instead of float(val) by default.
>> The real issue is when the delimiter is ' '... I should be able to
>> take care of that over the week-end (which started earlier today over
>> here :)
>> Numpy-discussion mailing list
> Numpy-discussion mailing list
More information about the Numpy-discussion