Skip to content

Commit 027352a

Browse files
Update linalg.py (#87)
* Update linalg.py Remove print outputs from pinv * linters and checkers --------- Co-authored-by: Oriol (ProDesk) <oriol.abril.pla@gmail.com>
1 parent f81dc8b commit 027352a

8 files changed

Lines changed: 8 additions & 14 deletions

File tree

.pylintrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ persistent=yes
3030
# Specify a configuration file.
3131
#rcfile=
3232

33-
# When enabled, pylint would attempt to guess common misconfiguration and emit
34-
# user-friendly hints instead of false-positive error messages
35-
suggestion-mode=yes
36-
3733
# Allow loading of arbitrary C extensions. Extensions are imported into the
3834
# active Python interpreter and may run arbitrary code.
3935
unsafe-load-any-extension=no

src/xarray_einstats/linalg.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,12 +1019,7 @@ def pinv(da, dims=None, *, rcond=None, rtol=None, hermitian=False, **kwargs):
10191019
if isinstance(rtol, xr.DataArray):
10201020
da, rtol = xr.broadcast(da, rtol, exclude=set(dims))
10211021
pinv_kwargs["rtol"] = rtol
1022-
print(da)
1023-
print("\n")
1024-
print(rcond)
1025-
print("\n")
1026-
print(rtol)
1027-
print("------------------------\n")
1022+
10281023
return xr.apply_ufunc(
10291024
np.linalg.pinv,
10301025
da,

src/xarray_einstats/stats.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,7 @@ def _add_documented_method(cls, wrapped_cls, methods, extra_docs=None):
346346
setattr(cls, method_name, method)
347347

348348

349-
doc_extras = {
350-
"rvs": """
349+
doc_extras = {"rvs": """
351350
Parameters
352351
----------
353352
*args : scalar or array_like or DataArray, optional
@@ -372,8 +371,7 @@ def _add_documented_method(cls, wrapped_cls, methods, extra_docs=None):
372371
Passed to :func:`xarray.apply_ufunc`
373372
**kwargs
374373
Passed to the scipy distribution after broadcasting using the same key.
375-
"""
376-
}
374+
"""}
377375
base_methods = ["cdf", "logcdf", "sf", "logsf", "ppf", "isf", "rvs"]
378376
_add_documented_method(XrRV, "rv_generic", base_methods, doc_extras)
379377
_add_documented_method(

tests/test_accessors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=redefined-outer-name, no-self-use
22
"""Test the accessors."""
3+
34
from importlib.util import find_spec
45

56
import numpy as np

tests/test_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=redefined-outer-name, no-self-use
22
"""Test top level functions."""
3+
34
import numpy as np
45
import pytest
56

tests/test_linalg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=redefined-outer-name, no-self-use, too-many-public-methods
22
"""Test the linalg module."""
3+
34
import numpy as np
45
import packaging
56
import pytest

tests/test_numba.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=redefined-outer-name, no-self-use
22
"""Test the numba module."""
3+
34
import numpy as np
45
import pytest
56

tests/test_stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=redefined-outer-name, no-self-use, too-many-positional-arguments
22
"""Test the stats module."""
3+
34
import warnings
45

56
import numpy as np

0 commit comments

Comments
 (0)