[Numpy-discussion] np.loadtxt : yet a new implementation...
Wed Dec 3 11:08:15 CST 2008
On Dec 3, 2008, at 11:41 AM, Ryan May wrote:
> Found a problem. If you read the names from the file and specify
> usecols, you end up with the first N names read from the file as the
> fields in your output (where N is the number of entries in usecols),
> instead of having the names of the columns you asked for.
> I've attached a version that fixes this by setting a flag internally
> if the names are read from the file. If this flag is true, at the
> end the names are filtered down to only the ones that are given in
OK, thx. I'll take that into account and post a new version by the end
of the day.
> I also have one other thought. Is there any way we can make this
> handle object arrays, or rather, a field containing objects,
> specifically datetime objects? Right now, this does not work
> because calling view does not work for object arrays. I'm just
> looking for a simple way to store date/time in my record array
> (currently a string field).
It does already: you can upgrade the mapper of StringConverter to
support datetime object. Check an earlier post by JDH and my answer.
I'll add an example in the test suite.
More information about the Numpy-discussion