From edae3ac5689e4c3ed641ad28ee27aea537212566 Mon Sep 17 00:00:00 2001 From: Sait Cakmak Date: Mon, 20 Nov 2023 13:11:57 -0800 Subject: [PATCH] lint --- linear_operator/operators/_linear_operator.py | 2 +- linear_operator/operators/added_diag_linear_operator.py | 4 ++-- .../operators/batch_repeat_linear_operator.py | 2 +- linear_operator/operators/block_diag_linear_operator.py | 3 ++- .../operators/block_interleaved_linear_operator.py | 3 ++- linear_operator/operators/block_linear_operator.py | 3 ++- linear_operator/operators/cat_linear_operator.py | 5 +++-- linear_operator/operators/chol_linear_operator.py | 3 ++- .../operators/constant_mul_linear_operator.py | 3 ++- linear_operator/operators/diag_linear_operator.py | 2 +- linear_operator/operators/identity_linear_operator.py | 7 ++++--- .../operators/interpolated_linear_operator.py | 9 +++++---- linear_operator/operators/keops_linear_operator.py | 3 ++- linear_operator/operators/kernel_linear_operator.py | 3 ++- .../operators/kronecker_product_linear_operator.py | 9 +++------ .../low_rank_root_added_diag_linear_operator.py | 5 +++-- linear_operator/operators/masked_linear_operator.py | 4 ++-- linear_operator/operators/matmul_linear_operator.py | 7 ++++--- linear_operator/operators/mul_linear_operator.py | 5 +++-- linear_operator/operators/root_linear_operator.py | 7 ++++--- linear_operator/operators/sum_batch_linear_operator.py | 5 +++-- linear_operator/operators/sum_linear_operator.py | 3 ++- linear_operator/operators/toeplitz_linear_operator.py | 3 ++- linear_operator/operators/triangular_linear_operator.py | 5 +++-- linear_operator/operators/zero_linear_operator.py | 3 ++- linear_operator/test/linear_operator_test_case.py | 2 +- test/operators/test_diag_linear_operator.py | 5 +---- test/operators/test_kronecker_product_linear_operator.py | 5 +---- 28 files changed, 65 insertions(+), 55 deletions(-) diff --git a/linear_operator/operators/_linear_operator.py b/linear_operator/operators/_linear_operator.py index 44b14ee1..b3243571 100644 --- a/linear_operator/operators/_linear_operator.py +++ b/linear_operator/operators/_linear_operator.py @@ -33,6 +33,7 @@ from linear_operator.functions._root_decomposition import RootDecomposition from linear_operator.functions._solve import Solve from linear_operator.functions._sqrt_inv_matmul import SqrtInvMatmul +from linear_operator.operators.linear_operator_representation_tree import LinearOperatorRepresentationTree from linear_operator.utils.broadcasting import _matmul_broadcast_shape from linear_operator.utils.cholesky import psd_safe_cholesky from linear_operator.utils.deprecation import _deprecate_renamed_methods @@ -56,7 +57,6 @@ ) from linear_operator.utils.pinverse import stable_pinverse from linear_operator.utils.warnings import NumericalWarning, PerformanceWarning -from linear_operator.operators.linear_operator_representation_tree import LinearOperatorRepresentationTree _HANDLED_FUNCTIONS = {} _HANDLED_SECOND_ARG_FUNCTIONS = {} diff --git a/linear_operator/operators/added_diag_linear_operator.py b/linear_operator/operators/added_diag_linear_operator.py index d1472b02..71a82e46 100644 --- a/linear_operator/operators/added_diag_linear_operator.py +++ b/linear_operator/operators/added_diag_linear_operator.py @@ -10,13 +10,13 @@ from torch import Tensor from linear_operator import settings -from linear_operator.utils.memoize import cached -from linear_operator.utils.warnings import NumericalWarning from linear_operator.operators._linear_operator import LinearOperator from linear_operator.operators.diag_linear_operator import ConstantDiagLinearOperator, DiagLinearOperator from linear_operator.operators.psd_sum_linear_operator import PsdSumLinearOperator from linear_operator.operators.root_linear_operator import RootLinearOperator from linear_operator.operators.sum_linear_operator import SumLinearOperator +from linear_operator.utils.memoize import cached +from linear_operator.utils.warnings import NumericalWarning class AddedDiagLinearOperator(SumLinearOperator): diff --git a/linear_operator/operators/batch_repeat_linear_operator.py b/linear_operator/operators/batch_repeat_linear_operator.py index a708d08a..04ee478e 100644 --- a/linear_operator/operators/batch_repeat_linear_operator.py +++ b/linear_operator/operators/batch_repeat_linear_operator.py @@ -9,9 +9,9 @@ from torch import Tensor from linear_operator import settings +from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.utils.broadcasting import _matmul_broadcast_shape from linear_operator.utils.memoize import cached -from linear_operator.operators._linear_operator import IndexType, LinearOperator class BatchRepeatLinearOperator(LinearOperator): diff --git a/linear_operator/operators/block_diag_linear_operator.py b/linear_operator/operators/block_diag_linear_operator.py index fff0239c..971f5de2 100644 --- a/linear_operator/operators/block_diag_linear_operator.py +++ b/linear_operator/operators/block_diag_linear_operator.py @@ -7,10 +7,11 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.block_linear_operator import BlockLinearOperator +from linear_operator.utils.memoize import cached + # metaclass of BlockDiagLinearOperator, overwrites behavior of constructor call # _MetaBlockDiagLinearOperator(base_linear_op, block_dim=-3) to return a DiagLinearOperator diff --git a/linear_operator/operators/block_interleaved_linear_operator.py b/linear_operator/operators/block_interleaved_linear_operator.py index d5482c7a..ccfd6bb1 100644 --- a/linear_operator/operators/block_interleaved_linear_operator.py +++ b/linear_operator/operators/block_interleaved_linear_operator.py @@ -5,10 +5,11 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.block_linear_operator import BlockLinearOperator +from linear_operator.utils.memoize import cached + class BlockInterleavedLinearOperator(BlockLinearOperator): """ diff --git a/linear_operator/operators/block_linear_operator.py b/linear_operator/operators/block_linear_operator.py index f6a19650..8ad44763 100644 --- a/linear_operator/operators/block_linear_operator.py +++ b/linear_operator/operators/block_linear_operator.py @@ -7,10 +7,11 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.getitem import _is_noop_index, _noop_index from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.dense_linear_operator import to_linear_operator +from linear_operator.utils.getitem import _is_noop_index, _noop_index + class BlockLinearOperator(LinearOperator): """ diff --git a/linear_operator/operators/cat_linear_operator.py b/linear_operator/operators/cat_linear_operator.py index 4c0fb9d7..521d8e02 100644 --- a/linear_operator/operators/cat_linear_operator.py +++ b/linear_operator/operators/cat_linear_operator.py @@ -8,12 +8,13 @@ from jaxtyping import Float from torch import Tensor +from linear_operator.operators._linear_operator import IndexType, LinearOperator, to_dense +from linear_operator.operators.dense_linear_operator import DenseLinearOperator, to_linear_operator + from linear_operator.utils.broadcasting import _matmul_broadcast_shape from linear_operator.utils.deprecation import bool_compat from linear_operator.utils.generic import _to_helper from linear_operator.utils.getitem import _noop_index -from linear_operator.operators._linear_operator import IndexType, LinearOperator, to_dense -from linear_operator.operators.dense_linear_operator import DenseLinearOperator, to_linear_operator def cat(inputs, dim=0, output_device=None): diff --git a/linear_operator/operators/chol_linear_operator.py b/linear_operator/operators/chol_linear_operator.py index 18035d23..6b502d91 100644 --- a/linear_operator/operators/chol_linear_operator.py +++ b/linear_operator/operators/chol_linear_operator.py @@ -9,11 +9,12 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import LinearOperator from linear_operator.operators.root_linear_operator import RootLinearOperator from linear_operator.operators.triangular_linear_operator import _TriangularLinearOperatorBase, TriangularLinearOperator +from linear_operator.utils.memoize import cached + class CholLinearOperator(RootLinearOperator): r""" diff --git a/linear_operator/operators/constant_mul_linear_operator.py b/linear_operator/operators/constant_mul_linear_operator.py index a845f1ad..44215365 100644 --- a/linear_operator/operators/constant_mul_linear_operator.py +++ b/linear_operator/operators/constant_mul_linear_operator.py @@ -8,10 +8,11 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.root_linear_operator import RootLinearOperator +from linear_operator.utils.memoize import cached + class ConstantMulLinearOperator(LinearOperator): """ diff --git a/linear_operator/operators/diag_linear_operator.py b/linear_operator/operators/diag_linear_operator.py index 6b6f8311..a5553bd0 100644 --- a/linear_operator/operators/diag_linear_operator.py +++ b/linear_operator/operators/diag_linear_operator.py @@ -9,11 +9,11 @@ from torch import Tensor from linear_operator import settings -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.block_diag_linear_operator import BlockDiagLinearOperator from linear_operator.operators.dense_linear_operator import DenseLinearOperator from linear_operator.operators.triangular_linear_operator import TriangularLinearOperator +from linear_operator.utils.memoize import cached class DiagLinearOperator(TriangularLinearOperator): diff --git a/linear_operator/operators/identity_linear_operator.py b/linear_operator/operators/identity_linear_operator.py index 8c31d4f1..435e7cf0 100644 --- a/linear_operator/operators/identity_linear_operator.py +++ b/linear_operator/operators/identity_linear_operator.py @@ -8,13 +8,14 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.generic import _to_helper -from linear_operator.utils.getitem import _compute_getitem_size, _is_noop_index -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.diag_linear_operator import ConstantDiagLinearOperator from linear_operator.operators.zero_linear_operator import ZeroLinearOperator +from linear_operator.utils.generic import _to_helper +from linear_operator.utils.getitem import _compute_getitem_size, _is_noop_index +from linear_operator.utils.memoize import cached + class IdentityLinearOperator(ConstantDiagLinearOperator): """ diff --git a/linear_operator/operators/interpolated_linear_operator.py b/linear_operator/operators/interpolated_linear_operator.py index ea118370..d088eb25 100644 --- a/linear_operator/operators/interpolated_linear_operator.py +++ b/linear_operator/operators/interpolated_linear_operator.py @@ -8,15 +8,16 @@ from jaxtyping import Float from torch import Tensor +from linear_operator.operators._linear_operator import IndexType, LinearOperator +from linear_operator.operators.dense_linear_operator import DenseLinearOperator, to_linear_operator +from linear_operator.operators.diag_linear_operator import DiagLinearOperator +from linear_operator.operators.root_linear_operator import RootLinearOperator + from linear_operator.utils import sparse from linear_operator.utils.broadcasting import _pad_with_singletons from linear_operator.utils.generic import _to_helper from linear_operator.utils.getitem import _noop_index from linear_operator.utils.interpolation import left_interp, left_t_interp -from linear_operator.operators._linear_operator import IndexType, LinearOperator -from linear_operator.operators.dense_linear_operator import DenseLinearOperator, to_linear_operator -from linear_operator.operators.diag_linear_operator import DiagLinearOperator -from linear_operator.operators.root_linear_operator import RootLinearOperator class InterpolatedLinearOperator(LinearOperator): diff --git a/linear_operator/operators/keops_linear_operator.py b/linear_operator/operators/keops_linear_operator.py index 81f4c322..9fd0cd83 100644 --- a/linear_operator/operators/keops_linear_operator.py +++ b/linear_operator/operators/keops_linear_operator.py @@ -8,9 +8,10 @@ from jaxtyping import Float from torch import Tensor +from linear_operator.operators._linear_operator import IndexType, LinearOperator + from linear_operator.utils.getitem import _noop_index from linear_operator.utils.memoize import cached -from linear_operator.operators._linear_operator import IndexType, LinearOperator class KeOpsLinearOperator(LinearOperator): diff --git a/linear_operator/operators/kernel_linear_operator.py b/linear_operator/operators/kernel_linear_operator.py index 92ca6014..0d1c009d 100644 --- a/linear_operator/operators/kernel_linear_operator.py +++ b/linear_operator/operators/kernel_linear_operator.py @@ -6,10 +6,11 @@ from jaxtyping import Float from torch import Tensor +from linear_operator.operators._linear_operator import LinearOperator, to_dense + from linear_operator.utils.broadcasting import _pad_with_singletons from linear_operator.utils.getitem import _noop_index, IndexType from linear_operator.utils.memoize import cached -from linear_operator.operators._linear_operator import LinearOperator, to_dense def _x_getitem(x, batch_indices, data_index): diff --git a/linear_operator/operators/kronecker_product_linear_operator.py b/linear_operator/operators/kronecker_product_linear_operator.py index b74740c0..1cece8b0 100644 --- a/linear_operator/operators/kronecker_product_linear_operator.py +++ b/linear_operator/operators/kronecker_product_linear_operator.py @@ -9,15 +9,12 @@ from torch import Tensor from linear_operator import settings -from linear_operator.utils.broadcasting import _matmul_broadcast_shape -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.dense_linear_operator import to_linear_operator from linear_operator.operators.diag_linear_operator import ConstantDiagLinearOperator, DiagLinearOperator -from linear_operator.operators.triangular_linear_operator import ( - _TriangularLinearOperatorBase, - TriangularLinearOperator, -) +from linear_operator.operators.triangular_linear_operator import _TriangularLinearOperatorBase, TriangularLinearOperator +from linear_operator.utils.broadcasting import _matmul_broadcast_shape +from linear_operator.utils.memoize import cached def _kron_diag(*lts) -> Tensor: diff --git a/linear_operator/operators/low_rank_root_added_diag_linear_operator.py b/linear_operator/operators/low_rank_root_added_diag_linear_operator.py index ec1dc738..6e7f1aba 100644 --- a/linear_operator/operators/low_rank_root_added_diag_linear_operator.py +++ b/linear_operator/operators/low_rank_root_added_diag_linear_operator.py @@ -5,8 +5,6 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.cholesky import psd_safe_cholesky -from linear_operator.utils.memoize import cached from linear_operator.operators import to_dense from linear_operator.operators._linear_operator import LinearOperator from linear_operator.operators.added_diag_linear_operator import AddedDiagLinearOperator @@ -14,6 +12,9 @@ from linear_operator.operators.low_rank_root_linear_operator import LowRankRootLinearOperator from linear_operator.operators.sum_batch_linear_operator import SumBatchLinearOperator +from linear_operator.utils.cholesky import psd_safe_cholesky +from linear_operator.utils.memoize import cached + class LowRankRootAddedDiagLinearOperator(AddedDiagLinearOperator): def __init__(self, *linear_ops, preconditioner_override=None): diff --git a/linear_operator/operators/masked_linear_operator.py b/linear_operator/operators/masked_linear_operator.py index 168a6060..b9ffd148 100644 --- a/linear_operator/operators/masked_linear_operator.py +++ b/linear_operator/operators/masked_linear_operator.py @@ -4,10 +4,10 @@ from jaxtyping import Bool, Float from torch import Tensor -from linear_operator.utils.generic import _to_helper - from linear_operator.operators._linear_operator import _is_noop_index, IndexType, LinearOperator +from linear_operator.utils.generic import _to_helper + class MaskedLinearOperator(LinearOperator): r""" diff --git a/linear_operator/operators/matmul_linear_operator.py b/linear_operator/operators/matmul_linear_operator.py index af15c5c8..0bd93f21 100644 --- a/linear_operator/operators/matmul_linear_operator.py +++ b/linear_operator/operators/matmul_linear_operator.py @@ -6,13 +6,14 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.broadcasting import _matmul_broadcast_shape, _pad_with_singletons -from linear_operator.utils.getitem import _noop_index -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.dense_linear_operator import DenseLinearOperator, to_linear_operator from linear_operator.operators.diag_linear_operator import DiagLinearOperator +from linear_operator.utils.broadcasting import _matmul_broadcast_shape, _pad_with_singletons +from linear_operator.utils.getitem import _noop_index +from linear_operator.utils.memoize import cached + def _inner_repeat(tensor, amt): return tensor.unsqueeze(-1).repeat(amt, 1).squeeze(-1) diff --git a/linear_operator/operators/mul_linear_operator.py b/linear_operator/operators/mul_linear_operator.py index 51edd11a..9d3dfd60 100644 --- a/linear_operator/operators/mul_linear_operator.py +++ b/linear_operator/operators/mul_linear_operator.py @@ -5,12 +5,13 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.broadcasting import _matmul_broadcast_shape -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.linear_operator_representation_tree import LinearOperatorRepresentationTree from linear_operator.operators.root_linear_operator import RootLinearOperator +from linear_operator.utils.broadcasting import _matmul_broadcast_shape +from linear_operator.utils.memoize import cached + class MulLinearOperator(LinearOperator): def _check_args(self, left_linear_op, right_linear_op): diff --git a/linear_operator/operators/root_linear_operator.py b/linear_operator/operators/root_linear_operator.py index 189a1fce..50a257ef 100644 --- a/linear_operator/operators/root_linear_operator.py +++ b/linear_operator/operators/root_linear_operator.py @@ -5,13 +5,14 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.broadcasting import _pad_with_singletons -from linear_operator.utils.getitem import _equal_indices, _noop_index -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.dense_linear_operator import DenseLinearOperator, to_linear_operator from linear_operator.operators.matmul_linear_operator import MatmulLinearOperator +from linear_operator.utils.broadcasting import _pad_with_singletons +from linear_operator.utils.getitem import _equal_indices, _noop_index +from linear_operator.utils.memoize import cached + class RootLinearOperator(LinearOperator): def __init__(self, root): diff --git a/linear_operator/operators/sum_batch_linear_operator.py b/linear_operator/operators/sum_batch_linear_operator.py index 20a1e65b..50042a58 100644 --- a/linear_operator/operators/sum_batch_linear_operator.py +++ b/linear_operator/operators/sum_batch_linear_operator.py @@ -4,11 +4,12 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.broadcasting import _pad_with_singletons -from linear_operator.utils.getitem import _noop_index from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.block_linear_operator import BlockLinearOperator +from linear_operator.utils.broadcasting import _pad_with_singletons +from linear_operator.utils.getitem import _noop_index + class SumBatchLinearOperator(BlockLinearOperator): """ diff --git a/linear_operator/operators/sum_linear_operator.py b/linear_operator/operators/sum_linear_operator.py index 547bc2eb..3fb511b1 100644 --- a/linear_operator/operators/sum_linear_operator.py +++ b/linear_operator/operators/sum_linear_operator.py @@ -5,11 +5,12 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.dense_linear_operator import to_linear_operator from linear_operator.operators.zero_linear_operator import ZeroLinearOperator +from linear_operator.utils.memoize import cached + # from linear_operator.operators.broadcasted_linear_operator import BroadcastedLinearOperator diff --git a/linear_operator/operators/toeplitz_linear_operator.py b/linear_operator/operators/toeplitz_linear_operator.py index 11056894..90057e2e 100644 --- a/linear_operator/operators/toeplitz_linear_operator.py +++ b/linear_operator/operators/toeplitz_linear_operator.py @@ -5,9 +5,10 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.toeplitz import sym_toeplitz_derivative_quadratic_form, sym_toeplitz_matmul from linear_operator.operators._linear_operator import IndexType, LinearOperator +from linear_operator.utils.toeplitz import sym_toeplitz_derivative_quadratic_form, sym_toeplitz_matmul + class ToeplitzLinearOperator(LinearOperator): def __init__(self, column): diff --git a/linear_operator/operators/triangular_linear_operator.py b/linear_operator/operators/triangular_linear_operator.py index 5053fd44..3dbeb883 100644 --- a/linear_operator/operators/triangular_linear_operator.py +++ b/linear_operator/operators/triangular_linear_operator.py @@ -6,12 +6,13 @@ from jaxtyping import Float from torch import Tensor -from linear_operator.utils.errors import NotPSDError -from linear_operator.utils.memoize import cached from linear_operator.operators._linear_operator import IndexType, LinearOperator from linear_operator.operators.batch_repeat_linear_operator import BatchRepeatLinearOperator from linear_operator.operators.dense_linear_operator import DenseLinearOperator +from linear_operator.utils.errors import NotPSDError +from linear_operator.utils.memoize import cached + Allsor = Union[Tensor, LinearOperator] diff --git a/linear_operator/operators/zero_linear_operator.py b/linear_operator/operators/zero_linear_operator.py index db59d086..8c6d5867 100644 --- a/linear_operator/operators/zero_linear_operator.py +++ b/linear_operator/operators/zero_linear_operator.py @@ -8,9 +8,10 @@ from jaxtyping import Float from torch import Tensor +from linear_operator.operators._linear_operator import IndexType, LinearOperator + from linear_operator.utils.getitem import _compute_getitem_size from linear_operator.utils.memoize import cached -from linear_operator.operators._linear_operator import IndexType, LinearOperator class ZeroLinearOperator(LinearOperator): diff --git a/linear_operator/test/linear_operator_test_case.py b/linear_operator/test/linear_operator_test_case.py index d5f0afe6..f41cca66 100644 --- a/linear_operator/test/linear_operator_test_case.py +++ b/linear_operator/test/linear_operator_test_case.py @@ -12,10 +12,10 @@ import linear_operator from linear_operator.operators import DenseLinearOperator, DiagLinearOperator, to_dense from linear_operator.settings import linalg_dtypes +from linear_operator.test.base_test_case import BaseTestCase from linear_operator.utils.errors import CachingError from linear_operator.utils.memoize import get_from_cache from linear_operator.utils.warnings import PerformanceWarning -from linear_operator.test.base_test_case import BaseTestCase class RectangularLinearOperatorTestCase(BaseTestCase): diff --git a/test/operators/test_diag_linear_operator.py b/test/operators/test_diag_linear_operator.py index 7bf104c4..a93a4263 100644 --- a/test/operators/test_diag_linear_operator.py +++ b/test/operators/test_diag_linear_operator.py @@ -4,10 +4,7 @@ import torch -from linear_operator.operators import ( - DiagLinearOperator, - KroneckerProductDiagLinearOperator -) +from linear_operator.operators import DiagLinearOperator, KroneckerProductDiagLinearOperator from linear_operator.test.linear_operator_test_case import LinearOperatorTestCase diff --git a/test/operators/test_kronecker_product_linear_operator.py b/test/operators/test_kronecker_product_linear_operator.py index 77d4805c..8c03ea04 100644 --- a/test/operators/test_kronecker_product_linear_operator.py +++ b/test/operators/test_kronecker_product_linear_operator.py @@ -4,10 +4,7 @@ import torch -from linear_operator.operators import ( - DenseLinearOperator, - KroneckerProductLinearOperator, -) +from linear_operator.operators import DenseLinearOperator, KroneckerProductLinearOperator from linear_operator.test.linear_operator_test_case import LinearOperatorTestCase, RectangularLinearOperatorTestCase