Skip to content

Commit

Permalink
FIX shape calculation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dantegd committed Oct 6, 2023
1 parent 7bb5a9f commit 58ed69d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/cuml/internals/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@ def __init__(
self._mem_type = mem_type

if hasattr(data, "__cuda_array_interface__"):
# using CuPy allows processing delayed array wrappers
# like cumlarray without added complexity
data = cp.asarray(data)
# need to reshape if user requests specific shape
if shape is not None:
data = data.reshape(shape)
self._array_interface = data.__cuda_array_interface__
if mem_type in (None, MemoryType.mirror):
self._mem_type = MemoryType.device
Expand Down

0 comments on commit 58ed69d

Please sign in to comment.