Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Sep 6, 2024
1 parent 27e5a19 commit 6d507e1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arraycontext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
"ArrayOrContainerOrScalarT",
"ArrayOrContainerT",
"ArrayT",
"CupyArrayContext",
"CommonSubexpressionTag",
"CupyArrayContext",
"EagerJAXArrayContext",
"ElementwiseMapKernelTag",
"NotAnArrayContainerError",
Expand Down
4 changes: 2 additions & 2 deletions arraycontext/impl/cupy/fake_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ def linspace(self, *args, **kwargs):
def zeros_like(self, ary):
if isinstance(ary, (int, float, complex)):
# Cupy does not support zeros_like with scalar arguments
ary=cp.array(ary)
ary = cp.array(ary)
return rec_map_array_container(cp.zeros_like, ary)

def ones_like(self, ary):
if isinstance(ary, (int, float, complex)):
# Cupy does not support ones_like with scalar arguments
ary=cp.array(ary)
ary = cp.array(ary)
return rec_map_array_container(cp.ones_like, ary)

def reshape(self, a, newshape, order="C"):
Expand Down
2 changes: 1 addition & 1 deletion arraycontext/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def __str__(self):
name = d["name"].decode("utf-8")
return f"<CupyArrayContext> on {cupy.cuda.Device()}:{name}"


# {{{ _PytestArrayContextFactory

class _NumpyArrayContextForTests(NumpyArrayContext):
Expand Down
1 change: 0 additions & 1 deletion test/test_arraycontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,6 @@ def test_actx_compile_kwargs(actx_factory):

rng = np.random.default_rng()


compiled_rhs = actx.compile(scale_and_orthogonalize)

v_x = rng.uniform(size=10)
Expand Down

0 comments on commit 6d507e1

Please sign in to comment.