diff options
author | default-303 <ajayds2001@gmail.com> | 2021-05-24 16:50:17 +0530 |
---|---|---|
committer | default-303 <ajayds2001@gmail.com> | 2021-05-24 16:50:17 +0530 |
commit | ca53c09c9a3b0c3eed59d4b0a0313fd5f76793fd (patch) | |
tree | 398a39a5207040414c2a9b564ae7e94fcbcaa156 | |
parent | 3dcd9248d1f77cd2b0f97a5e9adb8e3cdcb3421f (diff) | |
download | numpy-ca53c09c9a3b0c3eed59d4b0a0313fd5f76793fd.tar.gz |
MAINT: removed unused imports listed in LGTM
-rw-r--r-- | numpy/compat/py3k.py | 3 | ||||
-rw-r--r-- | numpy/core/defchararray.py | 1 | ||||
-rw-r--r-- | numpy/core/records.py | 1 | ||||
-rw-r--r-- | numpy/core/umath.py | 2 | ||||
-rw-r--r-- | numpy/distutils/fcompiler/nv.py | 2 | ||||
-rw-r--r-- | numpy/distutils/mingw32ccompiler.py | 1 | ||||
-rwxr-xr-x | numpy/f2py/crackfortran.py | 1 | ||||
-rw-r--r-- | numpy/lib/function_base.py | 1 | ||||
-rw-r--r-- | numpy/lib/npyio.py | 1 | ||||
-rw-r--r-- | numpy/ma/core.py | 1 | ||||
-rw-r--r-- | numpy/ma/extras.py | 1 | ||||
-rw-r--r-- | numpy/typing/_array_like.py | 3 | ||||
-rw-r--r-- | numpy/typing/_callable.py | 2 |
13 files changed, 2 insertions, 18 deletions
diff --git a/numpy/compat/py3k.py b/numpy/compat/py3k.py index e1e236d92..85136ce87 100644 --- a/numpy/compat/py3k.py +++ b/numpy/compat/py3k.py @@ -21,9 +21,6 @@ import os from pathlib import Path import io -import abc -from abc import ABC as abc_ABC - try: import pickle5 as pickle except ImportError: diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index ab1166ad2..e264fa210 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -16,7 +16,6 @@ The preferred alias for `defchararray` is `numpy.char`. """ import functools -import sys from .numerictypes import ( string_, unicode_, integer, int_, object_, bool_, character) from .numeric import ndarray, compare_chararrays diff --git a/numpy/core/records.py b/numpy/core/records.py index 5bd13a698..b3474ad01 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -33,7 +33,6 @@ Record arrays allow us to access fields as properties:: array([2., 2.]) """ -import os import warnings from collections import Counter from contextlib import nullcontext diff --git a/numpy/core/umath.py b/numpy/core/umath.py index 6a5474ffe..c49fc1460 100644 --- a/numpy/core/umath.py +++ b/numpy/core/umath.py @@ -11,7 +11,7 @@ from ._multiarray_umath import * # noqa: F403 # These imports are needed for backward compatibility, # do not change them. issue gh-11862 # _ones_like is semi-public, on purpose not added to __all__ -from ._multiarray_umath import _UFUNC_API, _add_newdoc_ufunc, _ones_like +from ._multiarray_umath import _UFUNC_API, _add_newdoc_ufunc __all__ = [ '_UFUNC_API', 'ERR_CALL', 'ERR_DEFAULT', 'ERR_IGNORE', 'ERR_LOG', diff --git a/numpy/distutils/fcompiler/nv.py b/numpy/distutils/fcompiler/nv.py index 8e9f16835..212f34806 100644 --- a/numpy/distutils/fcompiler/nv.py +++ b/numpy/distutils/fcompiler/nv.py @@ -1,5 +1,3 @@ -import sys - from numpy.distutils.fcompiler import FCompiler compilers = ['NVHPCFCompiler'] diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py index 4681d403b..c1e9937f4 100644 --- a/numpy/distutils/mingw32ccompiler.py +++ b/numpy/distutils/mingw32ccompiler.py @@ -15,7 +15,6 @@ import re import textwrap # Overwrite certain distutils.ccompiler functions: -import numpy.distutils.ccompiler # noqa: F401 from numpy.distutils import log # NT stuff # 1. Make sure libpython<version>.a exists for gcc. If not, build it. diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py index 6453bbecb..984bd642b 100755 --- a/numpy/f2py/crackfortran.py +++ b/numpy/f2py/crackfortran.py @@ -139,7 +139,6 @@ TODO: The above may be solved by creating appropriate preprocessor program, for example. """ -import io import sys import string import fileinput diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 783d45c2f..709a33c84 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -33,7 +33,6 @@ from numpy.core.umath import _add_newdoc_ufunc as add_newdoc_ufunc import builtins # needed in this module for compatibility -from numpy.lib.histograms import histogram, histogramdd array_function_dispatch = functools.partial( diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 9552579cf..0208da9ac 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -1,4 +1,3 @@ -import sys import os import re import functools diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 63d42ecca..4c204cac2 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -40,7 +40,6 @@ from numpy.compat import ( from numpy import expand_dims from numpy.core.numeric import normalize_axis_tuple from numpy.core._internal import recursive -from numpy.compat import pickle __all__ = [ diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py index bd5fc2ca3..c139f4640 100644 --- a/numpy/ma/extras.py +++ b/numpy/ma/extras.py @@ -33,7 +33,6 @@ from .core import ( import numpy as np from numpy import ndarray, array as nxarray -import numpy.core.umath as umath from numpy.core.multiarray import normalize_axis_index from numpy.core.numeric import normalize_axis_tuple from numpy.lib.function_base import _ureduce diff --git a/numpy/typing/_array_like.py b/numpy/typing/_array_like.py index 9f57b2295..2283c98d7 100644 --- a/numpy/typing/_array_like.py +++ b/numpy/typing/_array_like.py @@ -1,7 +1,7 @@ from __future__ import annotations import sys -from typing import Any, overload, Sequence, TYPE_CHECKING, Union, TypeVar +from typing import Any, Sequence, TYPE_CHECKING, Union, TypeVar from numpy import ( ndarray, @@ -20,7 +20,6 @@ from numpy import ( str_, bytes_, ) -from ._dtype_like import DTypeLike if sys.version_info >= (3, 8): from typing import Protocol diff --git a/numpy/typing/_callable.py b/numpy/typing/_callable.py index d9cb0f157..8f838f1ae 100644 --- a/numpy/typing/_callable.py +++ b/numpy/typing/_callable.py @@ -43,11 +43,9 @@ from ._scalars import ( _BoolLike_co, _IntLike_co, _FloatLike_co, - _ComplexLike_co, _NumberLike_co, ) from . import NBitBase -from ._array_like import ArrayLike from ._generic_alias import NDArray if sys.version_info >= (3, 8): |