Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 25, 2023
1 parent d73e9fb commit 37d7786
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 17 deletions.
6 changes: 0 additions & 6 deletions src/pysimulators/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ def __new__(
ndmin=0,
comm=None,
):

if isinstance(data, str):

if comm is None:
comm = MPI.COMM_SELF

Expand Down Expand Up @@ -641,7 +639,6 @@ def __new__(
ndmin=0,
comm=None,
):

# get a new Map instance (or a subclass if subok is True)
result = FitsArray.__new__(
cls,
Expand All @@ -660,7 +657,6 @@ def __new__(
result = result.view(cls)

if isinstance(data, str):

if comm is None:
comm = MPI.COMM_SELF

Expand Down Expand Up @@ -1022,7 +1018,6 @@ def __new__(
ndmin=0,
comm=None,
):

# get a new Tod instance (or a subclass if subok is True)
result = FitsArray.__new__(
cls,
Expand All @@ -1045,7 +1040,6 @@ def __new__(
mask = None

if mask is None and isinstance(data, str):

if comm is None:
comm = MPI.COMM_SELF

Expand Down
1 change: 0 additions & 1 deletion src/pysimulators/interfaces/madmap1.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def __init__(
commin=MPI.COMM_WORLD,
commout=MPI.COMM_WORLD,
):

if commin.size > 1 or commout.size > 1:
raise NotImplementedError(
'The parallelisation of the TOD is not implemented'
Expand Down
2 changes: 0 additions & 2 deletions src/pysimulators/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def block_diagonal(*partition_args, **keywords):
def func(cls):
@functools.wraps(cls.__init__)
def partition_init(self, *args, **keywords):

# get number of blocks through the partitionin keyword
n1 = 0
partitionin = None
Expand Down Expand Up @@ -611,7 +610,6 @@ class ProjectionBaseOperator(Operator):
def __init__(
self, units=None, derived_units=None, attrin={}, attrout={}, **keywords
):

if units is None:
units = ('', '')
if derived_units is None:
Expand Down
2 changes: 0 additions & 2 deletions src/pysimulators/quantities.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ def __new__(
subok=False,
ndmin=0,
):

data = np.asanyarray(data)
if dtype is None and data.dtype.kind == 'i':
dtype = float
Expand Down Expand Up @@ -685,7 +684,6 @@ def SI(self):
ffast = Quantity(1.0, '')
fslow = Quantity(1.0, '')
for key, val in self._unit.items():

# check if the unit is a local derived unit
newfactor, broadcast = _check_du(self, key, val, self.derived_units)

Expand Down
2 changes: 0 additions & 2 deletions tests/packedtables/test_packedtables.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def test_ndim1(shape):
],
)
def test_ndim2(shape, ndim):

layout = PackedTable(shape, ndim=ndim)
assert_equal(layout.ndim, ndim)
assert_equal(layout.shape, shape)
Expand Down Expand Up @@ -463,7 +462,6 @@ def test_ordering3():
],
)
def test_ordering4(ordering, expected):

layout = PackedTable((2, 3), ordering=ordering)
assert_equal(layout._index, expected)

Expand Down
1 change: 0 additions & 1 deletion tests/packedtables/test_samplings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
@pytest.mark.parametrize('fmt', [lambda ra: ((ra,), {}), lambda ra: ((), {'ra': ra})])
@pytest.mark.parametrize('ra', [1.0, (1.0,), [1.0], np.ones(10), np.ones((2, 3))])
def test_coords_ra(fmt, ra):

args, keywords = fmt(ra)
if len(args) > 0 and isscalarlike(args[0]):
p = SamplingEquatorial(*args, **keywords)
Expand Down
1 change: 0 additions & 1 deletion tests/test_datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def test_input3(type_):
],
)
def test_view(type_, attrs):

data = np.ones((2, 4)).view(type_)
for attr in attrs:
assert hasattr(data, attr)
Expand Down
1 change: 0 additions & 1 deletion tests/test_healpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
)
@pytest.mark.parametrize('nest', [False, True])
def test_cartesian_healpix(vec, shape, nest):

c2h = Cartesian2HealpixOperator(NSIDE, nest=nest)
h2c = Healpix2CartesianOperator(NSIDE, nest=nest)
a = h2c(c2h(vec))
Expand Down
1 change: 0 additions & 1 deletion tests/test_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ def ref_blackbody(w, T):


def test_blackbody_scalar():

w = np.arange(90.0, 111) * 1e-6
T = 15.0
flux = ref_blackbody(w, T) / ref_blackbody(100e-6, T)
Expand Down

0 comments on commit 37d7786

Please sign in to comment.