biggus icon indicating copy to clipboard operation
biggus copied to clipboard

Deprecated NumPy behaviour

Open QuLogic opened this issue 9 years ago • 0 comments

The tests seem to assert that some behaviour "works", but this behaviour is deprecated in NumPy:

test_getitem (biggus.tests.test_adapter.TestNumpyAdapter) ... .../biggus/build/lib/biggus/_init.py:1471: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 3 but corresponding boolean dimension is 2
  array = self.concrete.__getitem__(keys)
.../biggus/build/lib/biggus/_init.py:1471: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 1; dimension is 4 but corresponding boolean dimension is 3
  array = self.concrete.__getitem__(keys)
ok

test_getitem (biggus.tests.test_adapter.TestOrthoAdapter) ... .../biggus/build/lib/biggus/tests/test_adapter.py:202: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 0; dimension is 3 but corresponding boolean dimension is 2
  result = result.__getitem__(tuple(index))
.../biggus/build/lib/biggus/tests/test_adapter.py:202: VisibleDeprecationWarning: boolean index did not match indexed array along dimension 1; dimension is 4 but corresponding boolean dimension is 3
  result = result.__getitem__(tuple(index))
ok

are tests like Boolean indexing (too few indices - zero pad) and Boolean indexing (too many indices).

test_double_ellipsis (biggus.tests.unit.init.test__full_keys.Test__full_keys) ... .../biggus/build/lib/biggus/tests/unit/init/test__full_keys.py:38: DeprecationWarning: an index can only have a single Ellipsis (`...`); replace all but one with slices (`:`).
  assert_array_equal(a[keys], a[expected], msg)
ok

test_double_ellipsis_new_axis (biggus.tests.unit.init.test__full_keys.Test__full_keys) ... .../biggus/build/lib/biggus/tests/unit/init/test__full_keys.py:38: DeprecationWarning: an index can only have a single Ellipsis (`...`); replace all but one with slices (`:`).
  assert_array_equal(a[keys], a[expected], msg)
ok

test_redundant_ellipsis (biggus.tests.unit.init.test__full_keys.Test__full_keys) ... .../biggus/build/lib/biggus/tests/unit/init/test__full_keys.py:38: DeprecationWarning: an index can only have a single Ellipsis (`...`); replace all but one with slices (`:`).
  assert_array_equal(a[keys], a[expected], msg)
ok

from test__full_keys which sometimes seems to use an invalid ellipsis setup.

QuLogic avatar Jul 03 '16 04:07 QuLogic