Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DEP: Deprecate setting the strides attribute of a numpy array #28925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: main
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
correct ruff version
  • Loading branch information
eendebakpt committed May 15, 2025
commit 4bbbfbc6e027d8d17362d34b9c3e1453c4579eec
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import sys

import pytest
from numpy._core._rational_tests import rational

import numpy as np
import numpy._core.umath as ncu
from numpy._core._rational_tests import rational
from numpy.lib import stride_tricks
from numpy.testing import (
HAS_REFCOUNT,
Expand Down
4 changes: 2 additions & 2 deletions 4 numpy/_core/tests/test_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ def func(arg1, /, arg2, *, arg3):
import threading

import pytest

import numpy as np
from numpy._core._multiarray_tests import (
argparse_example_function as func,
)
from numpy._core._multiarray_tests import (
threaded_argparse_example_function as thread_func,
)

import numpy as np
from numpy.testing import IS_WASM


Expand Down
4 changes: 2 additions & 2 deletions 4 numpy/_core/tests/test_array_coercion.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

from itertools import permutations, product

import numpy._core._multiarray_umath as ncu
import pytest
from numpy._core._rational_tests import rational
from pytest import param

import numpy as np
import numpy._core._multiarray_umath as ncu
from numpy._core._rational_tests import rational
from numpy.testing import IS_64BIT, IS_PYPY, assert_array_equal


Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_arraymethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from typing import Any

import pytest
from numpy._core._multiarray_umath import _get_castingimpl as get_castingimpl

import numpy as np
from numpy._core._multiarray_umath import _get_castingimpl as get_castingimpl


class TestResolveDescriptors:
Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_casting_unittests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import textwrap

import pytest
from numpy._core._multiarray_umath import _get_castingimpl as get_castingimpl

import numpy as np
from numpy._core._multiarray_umath import _get_castingimpl as get_castingimpl
from numpy.lib.stride_tricks import as_strided
from numpy.testing import assert_array_equal

Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_conversion_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"""
import re

import numpy._core._multiarray_tests as mt
import pytest

import numpy._core._multiarray_tests as mt
from numpy._core.multiarray import CLIP, RAISE, WRAP
from numpy.testing import assert_raises

Expand Down
3 changes: 2 additions & 1 deletion 3 numpy/_core/tests/test_cpu_dispatcher.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from numpy._core import _umath_tests
from numpy._core._multiarray_umath import (
__cpu_baseline__,
__cpu_dispatch__,
__cpu_features__,
)

from numpy._core import _umath_tests
from numpy.testing import assert_equal


Expand Down
1 change: 0 additions & 1 deletion 1 numpy/_core/tests/test_cpu_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import sys

import pytest

from numpy._core._multiarray_umath import (
__cpu_baseline__,
__cpu_dispatch__,
Expand Down
4 changes: 2 additions & 2 deletions 4 numpy/_core/tests/test_custom_dtypes.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from tempfile import NamedTemporaryFile

import pytest

import numpy as np
from numpy._core._multiarray_umath import (
_discover_array_parameters as discover_array_params,
)
from numpy._core._multiarray_umath import _get_sfloat_dtype

import numpy as np
from numpy.testing import assert_array_equal

SF = _get_sfloat_dtype()
Expand Down
4 changes: 2 additions & 2 deletions 4 numpy/_core/tests/test_deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"""
import warnings

import numpy._core._struct_ufunc_tests as struct_ufunc
import pytest
from numpy._core._multiarray_tests import fromstring_null_term_c_api # noqa: F401

import numpy as np
import numpy._core._struct_ufunc_tests as struct_ufunc
from numpy._core._multiarray_tests import fromstring_null_term_c_api # noqa: F401
from numpy.testing import assert_raises, temppath

try:
Expand Down
4 changes: 2 additions & 2 deletions 4 numpy/_core/tests/test_dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
import hypothesis
import pytest
from hypothesis.extra import numpy as hynp
from numpy._core._multiarray_tests import create_custom_field_dtype
from numpy._core._rational_tests import rational

import numpy as np
import numpy.dtypes
from numpy._core._multiarray_tests import create_custom_field_dtype
from numpy._core._rational_tests import rational
from numpy.testing import (
HAS_REFCOUNT,
IS_PYSTON,
Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_extint128.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import itertools
import operator

import numpy._core._multiarray_tests as mt
import pytest

import numpy as np
import numpy._core._multiarray_tests as mt
from numpy.testing import assert_equal, assert_raises

INT64_MAX = np.iinfo(np.int64).max
Expand Down
1 change: 0 additions & 1 deletion 1 numpy/_core/tests/test_hashtable.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import random

import pytest

from numpy._core._multiarray_tests import identityhash_tester


Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from itertools import product

import pytest
from numpy._core._multiarray_tests import array_indexing

import numpy as np
from numpy._core._multiarray_tests import array_indexing
from numpy.exceptions import ComplexWarning, VisibleDeprecationWarning
from numpy.testing import (
HAS_REFCOUNT,
Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_mem_overlap.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import itertools

import pytest
from numpy._core._multiarray_tests import internal_overlap, solve_diophantine

import numpy as np
from numpy._core import _umath_tests
from numpy._core._multiarray_tests import internal_overlap, solve_diophantine
from numpy.lib.stride_tricks import as_strided
from numpy.testing import assert_, assert_array_equal, assert_equal, assert_raises

Expand Down
4 changes: 2 additions & 2 deletions 4 numpy/_core/tests/test_multiarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
from datetime import datetime, timedelta
from decimal import Decimal

import numpy._core._multiarray_tests as _multiarray_tests
import pytest
from numpy._core._rational_tests import rational

import numpy as np
import numpy._core._multiarray_tests as _multiarray_tests
from numpy._core._rational_tests import rational
from numpy._core.multiarray import _get_ndarray_c_version, dot
from numpy._core.tests._locales import CommaDecimalPointLocale
from numpy.exceptions import AxisError, ComplexWarning
Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_nditer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import sys
import textwrap

import numpy._core._multiarray_tests as _multiarray_tests
import pytest

import numpy as np
import numpy._core._multiarray_tests as _multiarray_tests
import numpy._core.umath as ncu
from numpy import all, arange, array, nditer
from numpy.testing import (
Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
from hypothesis import given
from hypothesis import strategies as st
from hypothesis.extra import numpy as hynp
from numpy._core._rational_tests import rational

import numpy as np
from numpy import ma
from numpy._core import sctypes
from numpy._core._rational_tests import rational
from numpy._core.numerictypes import obj2sctype
from numpy.exceptions import AxisError
from numpy.random import rand, randint, randn
Expand Down
4 changes: 2 additions & 2 deletions 4 numpy/_core/tests/test_scalarbuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Test scalar buffer interface adheres to PEP 3118
"""
import pytest

import numpy as np
from numpy._core._multiarray_tests import get_buffer_info
from numpy._core._rational_tests import rational

import numpy as np
from numpy.testing import assert_, assert_equal, assert_raises

# PEP3118 format strings for native (standard alignment and byteorder) types
Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_scalarmath.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from hypothesis import given, settings
from hypothesis.extra import numpy as hynp
from hypothesis.strategies import sampled_from
from numpy._core._rational_tests import rational

import numpy as np
from numpy._core._rational_tests import rational
from numpy._utils import _pep440
from numpy.exceptions import ComplexWarning
from numpy.testing import (
Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_simd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import re

import pytest

from numpy._core._multiarray_umath import __cpu_baseline__

from numpy._core._simd import clear_floatstatus, get_floatstatus, targets


Expand Down
6 changes: 3 additions & 3 deletions 6 numpy/_core/tests/test_ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import sys
import warnings

import numpy._core._operand_flag_tests as opflag_tests
import numpy._core._rational_tests as _rational_tests
import numpy._core._umath_tests as umt
import pytest
from pytest import param

import numpy as np
import numpy._core._operand_flag_tests as opflag_tests
import numpy._core._rational_tests as _rational_tests
import numpy._core._umath_tests as umt
import numpy._core.umath as ncu
import numpy.linalg._umath_linalg as uml
from numpy.exceptions import AxisError
Expand Down
2 changes: 1 addition & 1 deletion 2 numpy/_core/tests/test_umath_accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from os import path

import pytest
from numpy._core._multiarray_umath import __cpu_features__

import numpy as np
from numpy._core._multiarray_umath import __cpu_features__
from numpy.testing import assert_array_max_ulp
from numpy.testing._private.utils import _glibc_older_than

Expand Down
5 changes: 2 additions & 3 deletions 5 numpy/_core/tests/test_umath_complex.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import platform
import sys

# import the c-extension module directly since _arg is not exported via umath
import numpy._core._multiarray_umath as ncu
import pytest

import numpy as np

# import the c-extension module directly since _arg is not exported via umath
import numpy._core._multiarray_umath as ncu
from numpy.testing import (
assert_almost_equal,
assert_array_equal,
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.