From e5fbee49e5ffe17672e157bc20eae5e5419b4cf1 Mon Sep 17 00:00:00 2001 From: PrSh27 <102277860+PrSh27@users.noreply.github.com> Date: Thu, 24 Mar 2022 19:06:50 +0530 Subject: [PATCH 1/6] Remove line-to-long for _problems --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9c3aa4f0b..4b892c76b 100644 --- a/tox.ini +++ b/tox.ini @@ -70,7 +70,7 @@ commands = pylint src/probnum/filtsmooth --disable="no-member,arguments-differ,too-many-arguments,too-many-locals,too-few-public-methods,protected-access,unused-variable,unused-argument,no-self-use,duplicate-code,useless-param-doc" --jobs=0 pylint src/probnum/linalg --disable="no-member,abstract-method,arguments-differ,redefined-builtin,too-many-instance-attributes,too-many-arguments,too-many-locals,too-many-lines,too-many-statements,too-many-branches,too-complex,too-few-public-methods,protected-access,unused-argument,attribute-defined-outside-init,no-else-return,no-else-raise,no-self-use,else-if-used,duplicate-code,line-too-long,missing-module-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc" --jobs=0 pylint src/probnum/linops --disable="too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,no-else-return,no-else-raise,else-if-used,line-too-long,missing-class-docstring,missing-function-docstring,missing-raises-doc,duplicate-code" --jobs=0 - pylint src/probnum/problems --disable="too-many-arguments,too-many-locals,unused-variable,unused-argument,else-if-used,consider-using-from-import,duplicate-code,line-too-long,missing-module-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc" --jobs=0 + pylint src/probnum/problems --disable="too-many-arguments,too-many-locals,unused-variable,unused-argument,else-if-used,consider-using-from-import,duplicate-code,missing-module-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc" --jobs=0 pylint src/probnum/quad --disable="too-many-arguments,missing-module-docstring" --jobs=0 pylint src/probnum/randprocs --disable="arguments-differ,arguments-renamed,too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,unused-argument,no-else-return,duplicate-code,line-too-long,missing-module-docstring,missing-class-docstring,missing-function-docstring,missing-type-doc,missing-raises-doc,useless-param-doc,useless-type-doc,missing-return-type-doc" --jobs=0 pylint src/probnum/randprocs/kernels --disable="duplicate-code" --jobs=0 From c4ec67c2646216d4d71eecf62950265102ac592b Mon Sep 17 00:00:00 2001 From: PrSh27 <102277860+PrSh27@users.noreply.github.com> Date: Sat, 26 Mar 2022 15:12:13 +0530 Subject: [PATCH 2/6] Remove --- src/probnum/linops/_kronecker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/probnum/linops/_kronecker.py b/src/probnum/linops/_kronecker.py index adf1e0df2..010b3dd72 100644 --- a/src/probnum/linops/_kronecker.py +++ b/src/probnum/linops/_kronecker.py @@ -13,7 +13,8 @@ class Symmetrize(_linear_operator.LinearOperator): r"""Symmetrizes a vector in its matrix representation. - Given a vector :math:`x=\operatorname{vec}(X)` representing a square matrix :math:`X`, this linear operator computes :math:`y=\operatorname{vec}(\frac{1}{2}(X + X^\top))`. + Given a vector :math:`x=\operatorname{vec}(X)` representing a square matrix :math:`X`, + this linear operator computes :math:`y=\operatorname{vec}(\frac{1}{2}(X + X^\top))`. Parameters ---------- From 5239fd80c7b07ae6826bb2739c1c46e0113433e6 Mon Sep 17 00:00:00 2001 From: PrSh27 <102277860+PrSh27@users.noreply.github.com> Date: Sat, 26 Mar 2022 15:21:30 +0530 Subject: [PATCH 3/6] Remove line-too-long for _scaling --- src/probnum/linops/_scaling.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/probnum/linops/_scaling.py b/src/probnum/linops/_scaling.py index a99e27f8a..d26efa317 100644 --- a/src/probnum/linops/_scaling.py +++ b/src/probnum/linops/_scaling.py @@ -16,7 +16,8 @@ class Scaling(_linear_operator.LinearOperator): r"""Scaling linear operator. - Creates a diagonal linear operator which (non-uniformly) scales elements of vectors, defined by + Creates a diagonal linear operator which (non-uniformly) + scales elements of vectors, defined by .. math:: v \mapsto \begin{bmatrix} From 6eb25ebf805f292a96b02f1577ee5c1e9d26f7a8 Mon Sep 17 00:00:00 2001 From: PrSh27 <102277860+PrSh27@users.noreply.github.com> Date: Sat, 26 Mar 2022 15:27:47 +0530 Subject: [PATCH 4/6] - --- src/probnum/linops/_linear_operator.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/probnum/linops/_linear_operator.py b/src/probnum/linops/_linear_operator.py index ce9db727d..721790390 100644 --- a/src/probnum/linops/_linear_operator.py +++ b/src/probnum/linops/_linear_operator.py @@ -32,8 +32,8 @@ class LinearOperator: :class:`LinearOperator`, that defers linear operations to the original operators and combines the results. - To construct a concrete :class:`LinearOperator`, either pass appropriate callables to - the constructor of this class, or subclass it. + To construct a concrete :class:`LinearOperator`, either pass appropriate callables + to the constructor of this class, or subclass it. A subclass must implement either one of the methods ``_matvec`` and ``_matmat``, and the attributes/properties ``shape`` (pair of integers) and ``dtype`` (may be @@ -254,7 +254,8 @@ def astype( casting: Controls what kind of data casting may occur. subok: - If True, then sub-classes will be passed-through (default). False is currently not supported for linear operators. + If True, then sub-classes will be passed-through (default). + False is currently not supported for linear operators. copy: Whether to return a new linear operator, even if ``dtype`` is the same. """ @@ -828,8 +829,9 @@ def __matmul__( Returns ------- y : - A `np.matrix` or `np.ndarray` or `RandomVariable` with shape `(M,)` or `(M, 1)`, - depending on the type and shape of the x argument. + A `np.matrix` or `np.ndarray` or `RandomVariable` with + shape `(M,)` or `(M, 1)`,depending on the type and + shape of the x argument. Notes ----- This matvec wraps the user-specified matvec routine or overridden From 80fe84de42bd88d8432d8d04ceddd91085dc4d4e Mon Sep 17 00:00:00 2001 From: PrSh27 <102277860+PrSh27@users.noreply.github.com> Date: Sat, 26 Mar 2022 16:01:49 +0530 Subject: [PATCH 5/6] Remove line-too-long from /linops and add to/problems --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index b181bf379..54cc6b24a 100644 --- a/tox.ini +++ b/tox.ini @@ -69,8 +69,8 @@ commands = pylint src/probnum/diffeq --disable="redefined-outer-name,too-many-instance-attributes,too-many-arguments,too-many-locals,too-few-public-methods,protected-access,unnecessary-pass,unused-variable,unused-argument,no-else-return,no-else-raise,no-self-use,duplicate-code,line-too-long,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc" --jobs=0 pylint src/probnum/filtsmooth --disable="no-member,arguments-differ,too-many-arguments,too-many-locals,too-few-public-methods,protected-access,unused-variable,unused-argument,no-self-use,duplicate-code,useless-param-doc" --jobs=0 pylint src/probnum/linalg --disable="no-member,abstract-method,arguments-differ,redefined-builtin,too-many-instance-attributes,too-many-arguments,too-many-locals,too-many-lines,too-many-statements,too-many-branches,too-complex,too-few-public-methods,protected-access,unused-argument,attribute-defined-outside-init,no-else-return,no-else-raise,no-self-use,else-if-used,duplicate-code,line-too-long,missing-module-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc" --jobs=0 - pylint src/probnum/linops --disable="too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,no-else-return,no-else-raise,else-if-used,line-too-long,missing-class-docstring,missing-function-docstring,missing-raises-doc,duplicate-code" --jobs=0 - pylint src/probnum/problems --disable="too-many-arguments,too-many-locals,unused-variable,unused-argument,else-if-used,consider-using-from-import,duplicate-code,missing-module-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc" --jobs=0 + pylint src/probnum/linops --disable="too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,no-else-return,no-else-raise,else-if-used,missing-class-docstring,missing-function-docstring,missing-raises-doc,duplicate-code" --jobs=0 + pylint src/probnum/problems --disable="too-many-arguments,too-many-locals,unused-variable,unused-argument,else-if-used,consider-using-from-import,duplicate-code,line-too-long,missing-module-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc" --jobs=0 pylint src/probnum/quad --disable="too-many-arguments,missing-module-docstring" --jobs=0 pylint src/probnum/randprocs --disable="arguments-differ,arguments-renamed,too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,unused-argument,no-else-return,duplicate-code,line-too-long,missing-module-docstring,missing-class-docstring,missing-function-docstring,missing-type-doc,missing-raises-doc,useless-param-doc,useless-type-doc,missing-return-type-doc" --jobs=0 pylint src/probnum/randprocs/kernels --disable="duplicate-code" --jobs=0 From 87065343e4cf7720c06c28ebee1b59711f46bf7b Mon Sep 17 00:00:00 2001 From: PrSh27 <102277860+PrSh27@users.noreply.github.com> Date: Sat, 26 Mar 2022 18:01:56 +0530 Subject: [PATCH 6/6] Update _kronecker.py --- src/probnum/linops/_kronecker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/probnum/linops/_kronecker.py b/src/probnum/linops/_kronecker.py index 010b3dd72..2badf3010 100644 --- a/src/probnum/linops/_kronecker.py +++ b/src/probnum/linops/_kronecker.py @@ -13,8 +13,10 @@ class Symmetrize(_linear_operator.LinearOperator): r"""Symmetrizes a vector in its matrix representation. - Given a vector :math:`x=\operatorname{vec}(X)` representing a square matrix :math:`X`, - this linear operator computes :math:`y=\operatorname{vec}(\frac{1}{2}(X + X^\top))`. + Given a vector :math:`x=\operatorname{vec}(X)` + representing a square matrix :math:`X`, + this linear operator computes :math: + `y=\operatorname{vec}(\frac{1}{2}(X + X^\top))`. Parameters ----------