summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2022-11-29 23:33:27 +0200
committerGitHub <noreply@github.com>2022-11-29 23:33:27 +0200
commitb0b7a066c393a1d7cc69e9a6db7c7c7a3602b293 (patch)
treedc4f958c35884078fdfdc3b58c1627417c7c13b1 /numpy/lib
parent2cf8c40727b08c029cdaf7fce803d031a60499a2 (diff)
parentcbecc96b62477890174ae91433c4c9c28cc7765b (diff)
downloadnumpy-b0b7a066c393a1d7cc69e9a6db7c7c7a3602b293.tar.gz
Merge pull request #22619 from seberg/move-set_module
MAINT: Move set_module from numpy.core to numpy._utils
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/_datasource.py2
-rw-r--r--numpy/lib/function_base.py6
-rw-r--r--numpy/lib/index_tricks.py2
-rw-r--r--numpy/lib/polynomial.py3
-rw-r--r--numpy/lib/type_check.py2
-rw-r--r--numpy/lib/utils.py2
6 files changed, 9 insertions, 8 deletions
diff --git a/numpy/lib/_datasource.py b/numpy/lib/_datasource.py
index b7778234e..613733fa5 100644
--- a/numpy/lib/_datasource.py
+++ b/numpy/lib/_datasource.py
@@ -37,7 +37,7 @@ Example::
import os
import io
-from numpy.core.overrides import set_module
+from .._utils import set_module
_open = open
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 5f59254b6..0ab49fa11 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -4,6 +4,7 @@ import re
import sys
import warnings
+from .._utils import set_module
import numpy as np
import numpy.core.numeric as _nx
from numpy.core import transpose
@@ -19,7 +20,6 @@ from numpy.core.fromnumeric import (
ravel, nonzero, partition, mean, any, sum
)
from numpy.core.numerictypes import typecodes
-from numpy.core.overrides import set_module
from numpy.core import overrides
from numpy.core.function_base import add_newdoc
from numpy.lib.twodim_base import diag
@@ -4017,7 +4017,7 @@ def percentile(a,
since Python uses 0-based indexing, the code subtracts another 1 from the
index internally.
- The following formula determines the virtual index ``i + g``, the location
+ The following formula determines the virtual index ``i + g``, the location
of the percentile in the sorted sample:
.. math::
@@ -4306,7 +4306,7 @@ def quantile(a,
since Python uses 0-based indexing, the code subtracts another 1 from the
index internally.
- The following formula determines the virtual index ``i + g``, the location
+ The following formula determines the virtual index ``i + g``, the location
of the quantile in the sorted sample:
.. math::
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index 95d5e3ede..58dd394e1 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -3,6 +3,7 @@ import sys
import math
import warnings
+from .._utils import set_module
import numpy.core.numeric as _nx
from numpy.core.numeric import (
asarray, ScalarType, array, alltrue, cumprod, arange, ndim
@@ -12,7 +13,6 @@ from numpy.core.numerictypes import find_common_type, issubdtype
import numpy.matrixlib as matrixlib
from .function_base import diff
from numpy.core.multiarray import ravel_multi_index, unravel_index
-from numpy.core.overrides import set_module
from numpy.core import overrides, linspace
from numpy.lib.stride_tricks import as_strided
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index 6aa708861..0f7ab0334 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -9,12 +9,13 @@ __all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd',
import functools
import re
import warnings
+
+from .._utils import set_module
import numpy.core.numeric as NX
from numpy.core import (isscalar, abs, finfo, atleast_1d, hstack, dot, array,
ones)
from numpy.core import overrides
-from numpy.core.overrides import set_module
from numpy.lib.twodim_base import diag, vander
from numpy.lib.function_base import trim_zeros
from numpy.lib.type_check import iscomplex, real, imag, mintypecode
diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py
index 94d525f51..0dc014d76 100644
--- a/numpy/lib/type_check.py
+++ b/numpy/lib/type_check.py
@@ -9,9 +9,9 @@ __all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex',
'typename', 'asfarray', 'mintypecode',
'common_type']
+from .._utils import set_module
import numpy.core.numeric as _nx
from numpy.core.numeric import asarray, asanyarray, isnan, zeros
-from numpy.core.overrides import set_module
from numpy.core import overrides
from .ufunclike import isneginf, isposinf
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index afde8cc60..2a9d30b16 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -6,8 +6,8 @@ import re
import warnings
import functools
+from .._utils import set_module
from numpy.core.numerictypes import issubclass_, issubsctype, issubdtype
-from numpy.core.overrides import set_module
from numpy.core import ndarray, ufunc, asarray
import numpy as np