Fixed non-list tolist() bug#186
Conversation
|
Thx for this fix. Please also add a unit-test for it somewhere here |
|
I've updated the unit test to check this. An expected failure also succeeds now, although I think this might be due to a change (for the good) in numpy behavior, so I updated that test as well. |
|
@Thisch Is there anything else you need from me or can this be merged and a new release created? Travis passes for all non-archaic numpy versions. |
| [-1., -1., -0., 1., 2., 2., 2.] * pq.m | ||
| ) | ||
|
|
||
| @unittest.expectedFailure |
There was a problem hiding this comment.
Why was this change and the change below needed? It doesn't seem to be related to the bug fix in the tolist mehtod.
There was a problem hiding this comment.
@Thisch The numpy .fix method is something that we would like to behave the same in numpy and in quantities (i.e. it should round towards zero). It used to not work with quantities, which is why the expected failure was there. But it works now, because of changes in numpy I think (though it could be the result of my changes)? So I removed the expected failure because it now passes as it should.
I see. Thx for the fix and the unittest. IMO this is ready for being merged. |
|
I'd like to update the test matrix to remove older versions of NumPy, but we need to migrate to travis-ci.com first (see #187) |
Fixes #185.