[Numpy-discussion] loadtxt/savetxt tickets

Derek Homeier derek at astro.physik.uni-goettingen.de
Sat Mar 26 10:48:56 EDT 2011

Hi again,

On 26 Mar 2011, at 15:20, Derek Homeier wrote:
>> 1562:
>>   I attach a possible patch. This could also be the default
>> behavior to my mind, since the function caller can simply call
>> numpy.squeeze if needed. Changing default behavior would probably
>> break old code,
> Seems the fastest solution unless someone wants to change  
> numpy.squeeze
> as well. But the present patch does not call np.squeeze any more at
> all, so I
> propose to restore that behaviour for X.ndim > ndmin to remain really
> backwards
> compatible. It also seems easier to code when making the default
> ndmin=0.

I've got another somewhat general question: since it would probably be  
nice to
have a test for this, I found one could simply add something along the  
lines of

assert_equal(a.shape, x.shape)

to test_io.py - test_shaped_dtype(self)
or should one generally create a new test for such things (might still  
be better
in this case, since test_shaped_dtype does not really test different  


More information about the NumPy-Discussion mailing list