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

Deprecated NumPy behaviour  #180

Description

@QuLogic

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions