File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1212 get_array_module ,
1313 get_normalize_axis_index ,
1414 inplace_set ,
15- to_cupy_conditional ,
15+ to_numpy ,
1616)
1717from pylops .utils .typing import DTypeLike , InputDimsLike , IntNDArray , NDArray
1818
@@ -146,7 +146,7 @@ def __init__(
146146 # explicitly create a list of indices in the n-dimensional
147147 # model space which will be used in _rmatvec to place the input
148148 if ncp != np :
149- self .iavamask = _compute_iavamask (self .dims , axis , iava , ncp )
149+ self .iavamask = _compute_iavamask (self .dims , axis , to_numpy ( iava ) , ncp )
150150 self .inplace = inplace
151151 self .axis = axis
152152 self .iavareshape = iavareshape
@@ -173,7 +173,6 @@ def _rmatvec(self, x: NDArray) -> NDArray:
173173 )
174174 else :
175175 if not hasattr (self , "iavamask" ):
176- self .iava = to_cupy_conditional (x , self .iava )
177176 self .iavamask = _compute_iavamask (self .dims , self .axis , self .iava , ncp )
178177 y = ncp .zeros (int (self .shape [- 1 ]), dtype = self .dtype )
179178 y = inplace_set (x .ravel (), y , self .iavamask )
You can’t perform that action at this time.
0 commit comments