File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1313 get_normalize_axis_index ,
1414 inplace_set ,
1515 to_cupy_conditional ,
16+ to_numpy ,
1617)
1718from pylops .utils .typing import DTypeLike , InputDimsLike , IntNDArray , NDArray
1819
@@ -146,7 +147,7 @@ def __init__(
146147 # explicitly create a list of indices in the n-dimensional
147148 # model space which will be used in _rmatvec to place the input
148149 if ncp != np :
149- self .iavamask = _compute_iavamask (self .dims , axis , iava , ncp )
150+ self .iavamask = _compute_iavamask (self .dims , axis , to_numpy ( iava ) , ncp )
150151 self .inplace = inplace
151152 self .axis = axis
152153 self .iavareshape = iavareshape
@@ -173,7 +174,6 @@ def _rmatvec(self, x: NDArray) -> NDArray:
173174 )
174175 else :
175176 if not hasattr (self , "iavamask" ):
176- self .iava = to_cupy_conditional (x , self .iava )
177177 self .iavamask = _compute_iavamask (self .dims , self .axis , self .iava , ncp )
178178 y = ncp .zeros (int (self .shape [- 1 ]), dtype = self .dtype )
179179 y = inplace_set (x .ravel (), y , self .iavamask )
You can’t perform that action at this time.
0 commit comments