Closed pp-mo closed 10 years ago
Aggregation.getitem was behaving always as if self._axis == 0 (a previous restriction). Problem case example:
>>> data = np.zeros((5,4,3)) >>> data = biggus.NumpyArrayAdapter(data) >>> mean = biggus.mean(data, axis=1) >>> print 'Mean:', mean Mean: <_Aggregation shape=(5, 3) dtype=dtype('float64')> >>> print 'Mean[0]:', mean[0] Mean[0]: <_Aggregation shape=(5,) dtype=dtype('float64')>
-- shape should be (3,) instead of (5,)
It was also only tested for axis==0. Fixed that by just looping the existing test over all axes.
NB. The diff for the test looks a lot more obvious if you ignore whitespace. (Note the w=1 in the URL.)
w=1
Thanks @pp-mo! :smile:
Aggregation.getitem was behaving always as if self._axis == 0 (a previous restriction). Problem case example:
-- shape should be (3,) instead of (5,)
It was also only tested for axis==0. Fixed that by just looping the existing test over all axes.