On Sat, Mar 26, 2011 at 8:53 AM, Paul Anton Letnes < paul.anton.letnes@gmail.com> wrote:
Hi Derek!
On 26. mars 2011, at 15.48, Derek Homeier wrote:
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 ndim)?
Cheers, Derek
It would be nice to see your patch. I uploaded all of mine as mentioned. I'm no testing expert, but I am sure someone else will comment on it.
I put all these patches together at https://github.com/charris/numpy/tree/loadtxt-savetxt. Please pull from there to continue work on loadtxt/savetxt so as to avoid conflicts in the patches. One of the numpy tests is failing, I assume from patch conflicts, and more tests for the tickets are needed in any case. Also, new keywords should be added to the end, not put in the middle of existing keywords. I haven't reviewed the patches, just tried to get them organized. Also, I have Derek as the author on all of them, that can be changed if it is decided the credit should go elsewhere ;) Thanks for the work you all have been doing on these tickets. Chuck