[Numpy-discussion] More loadtxt() changes

Pierre GM pgmdevlist at gmail.com
Tue Nov 25 15:28:46 EST 2008


>> It shouldn't create any *extra* temporaries since we already make a  
>> list
> of lists before creating the final array.  It just introduces an extra
> looping step. (I'd reuse the existing list of lists).

Cool then, go for it.

>  If my understanding of
> StringConverter is correct, tweaking the new loadtxt for ma or
> timeseries would only require passing in modified versions of
> StringConverter.

Nope, we still need to double check whether there's any missing data  
in any field of the line we process, independently of the conversion.  
So there must be some extra loop involved, and I'd need a special  
function in numpy.ma to take care of that. So our options are
* create a new function in numpy.ma and leave np.loadtxt like that
* write a new np.loadtxt incorporating most of the ideas of the code I  
send, but I'd still need to adapt it to support masked values.

>
> I'll post that when I'm done and we can see if it looks like too much
> functionality stapled together or not.

Sounds like a plan. Wouldn't mind getting more feedback from fellow  
users before we get too deep, however...



More information about the NumPy-Discussion mailing list