Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Deprecated NumPy behaviour #180

Open
QuLogic opened this issue Jul 3, 2016 · 0 comments
Open

Deprecated NumPy behaviour #180

QuLogic opened this issue Jul 3, 2016 · 0 comments

Comments

@QuLogic
Copy link
Member

QuLogic commented Jul 3, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant