From d5fca741d1514cbe8d66add3cadc3a71bda184f5 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 29 Jul 2024 00:27:59 -0700 Subject: [PATCH] remove type:ignore from scipy imports (done at pyproject.toml level) --- meanas/eigensolvers.py | 4 ++-- meanas/fdfd/bloch.py | 8 ++++---- meanas/fdfd/operators.py | 2 +- meanas/fdfd/solvers.py | 2 +- meanas/fdfd/waveguide_2d.py | 2 +- meanas/fdfd/waveguide_cyl.py | 2 +- meanas/fdmath/operators.py | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/meanas/eigensolvers.py b/meanas/eigensolvers.py index 032f921..7a3a8a7 100644 --- a/meanas/eigensolvers.py +++ b/meanas/eigensolvers.py @@ -5,8 +5,8 @@ from typing import Callable import numpy from numpy.typing import NDArray, ArrayLike from numpy.linalg import norm -from scipy import sparse # type: ignore -import scipy.sparse.linalg as spalg # type: ignore +from scipy import sparse +import scipy.sparse.linalg as spalg def power_iteration( diff --git a/meanas/fdfd/bloch.py b/meanas/fdfd/bloch.py index f1f18ed..12660e7 100644 --- a/meanas/fdfd/bloch.py +++ b/meanas/fdfd/bloch.py @@ -100,10 +100,10 @@ import numpy from numpy import pi, real, trace from numpy.fft import fftfreq from numpy.typing import NDArray, ArrayLike -import scipy # type: ignore -import scipy.optimize # type: ignore -from scipy.linalg import norm # type: ignore -import scipy.sparse.linalg as spalg # type: ignore +import scipy +import scipy.optimize +from scipy.linalg import norm +import scipy.sparse.linalg as spalg from ..fdmath import fdfield_t, cfdfield_t diff --git a/meanas/fdfd/operators.py b/meanas/fdfd/operators.py index 3a489a7..32e3af0 100644 --- a/meanas/fdfd/operators.py +++ b/meanas/fdfd/operators.py @@ -28,7 +28,7 @@ The following operators are included: """ import numpy -import scipy.sparse as sparse # type: ignore +from scipy import sparse from ..fdmath import vec, dx_lists_t, vfdfield_t, vcfdfield_t from ..fdmath.operators import shift_with_mirror, shift_circ, curl_forward, curl_back diff --git a/meanas/fdfd/solvers.py b/meanas/fdfd/solvers.py index 8ac157c..0487a06 100644 --- a/meanas/fdfd/solvers.py +++ b/meanas/fdfd/solvers.py @@ -8,7 +8,7 @@ import logging import numpy from numpy.typing import ArrayLike, NDArray from numpy.linalg import norm -import scipy.sparse.linalg # type: ignore +import scipy.sparse.linalg from ..fdmath import dx_lists_t, vfdfield_t, vcfdfield_t from . import operators diff --git a/meanas/fdfd/waveguide_2d.py b/meanas/fdfd/waveguide_2d.py index 399574d..32e65bc 100644 --- a/meanas/fdfd/waveguide_2d.py +++ b/meanas/fdfd/waveguide_2d.py @@ -182,7 +182,7 @@ from typing import Any import numpy from numpy.typing import NDArray, ArrayLike from numpy.linalg import norm -import scipy.sparse as sparse # type: ignore +from scipy import sparse from ..fdmath.operators import deriv_forward, deriv_back, cross from ..fdmath import vec, unvec, dx_lists_t, vfdfield_t, vcfdfield_t diff --git a/meanas/fdfd/waveguide_cyl.py b/meanas/fdfd/waveguide_cyl.py index 596c6be..65778ba 100644 --- a/meanas/fdfd/waveguide_cyl.py +++ b/meanas/fdfd/waveguide_cyl.py @@ -9,7 +9,7 @@ As the z-dependence is known, all the functions in this file assume a 2D grid # TODO update module docs import numpy -import scipy.sparse as sparse # type: ignore +from scipy import sparse from ..fdmath import vec, unvec, dx_lists_t, vfdfield_t, cfdfield_t from ..fdmath.operators import deriv_forward, deriv_back diff --git a/meanas/fdmath/operators.py b/meanas/fdmath/operators.py index c085808..79ddfee 100644 --- a/meanas/fdmath/operators.py +++ b/meanas/fdmath/operators.py @@ -7,7 +7,7 @@ from typing import Sequence import numpy from numpy.typing import NDArray from numpy import floating -import scipy.sparse as sparse # type: ignore +from scipy import sparse from .types import vfdfield_t