Skip to content

Commit 004e85f

Browse files
committed
pyopencl: remove unused astype
1 parent c50ee3e commit 004e85f

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

arraycontext/impl/pyopencl/fake_numpy.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@ def rec_equal(x, y):
267267
result = result.get()[()]
268268
return result
269269

270-
def astype(self, a, dtype):
271-
return rec_map_array_container(
272-
lambda x: x.astype(dtype, queue=self._array_context.queue),
273-
a)
274-
275270
# }}}
276271

277272

arraycontext/impl/pytato/fake_numpy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ def __getattr__(self, name):
6565
return super().__getattr__(name)
6666

6767
def reshape(self, a, newshape, order="C"):
68-
return rec_multimap_array_container(
69-
partial(pt.reshape, order=order), a, newshape)
68+
return rec_map_array_container(
69+
lambda ary: pt.reshape(a, newshape, order=order),
70+
a)
7071

7172
def transpose(self, a, axes=None):
7273
return rec_multimap_array_container(pt.transpose, a, axes)

0 commit comments

Comments
 (0)