[Numpy-discussion] bug in genfromtxt with missing values?

Pierre GM pgmdevlist at gmail.com
Tue Jan 25 16:58:37 EST 2011


On Jan 25, 2011, at 9:06 PM, Bruce Southey wrote:
> Your filling_values is zero so there is this line (1295?) in the code:
> user_filling_values = filling_values or []
> 
> Which of cause presumes your filling_values is not something like 0 or [0].

That's the bug. I forgot that filling_values could be 0. (I was more thinking of None)
so it should be
if filling_values is None:
	filling_values = []
user_filling_values = filling_values.


> Now it can be a code bug or just undocumented feature that 
> filling_values can not a single zero. Thus something like these work:

You're too kind. That's just sloppy coding...
If you correct it before i do, don't forget to add a test case...
Thx again

P.


More information about the NumPy-Discussion mailing list