diff --git a/dedalus/core/basis.py b/dedalus/core/basis.py index 68ba5a6e..c67567c1 100644 --- a/dedalus/core/basis.py +++ b/dedalus/core/basis.py @@ -3600,7 +3600,7 @@ def forward_regularity_recombination(self, tensorsig, axis, gdata, ell_maps): Q = self.radial_recombinations(tensorsig, ell_list) # Flatten tensor axes shape = gdata.shape - temp = gdata.reshape((-1,)+shape[rank:]) + temp = gdata.reshape((np.prod(shape[:rank]),)+shape[rank:]) slices = [slice(None) for i in range(temp.ndim)] # Apply Q transformations for each ell to flattened tensor data for ell, m_ind, ell_ind in ell_maps: @@ -3617,7 +3617,7 @@ def backward_regularity_recombination(self, tensorsig, axis, gdata, ell_maps): Q = self.radial_recombinations(tensorsig, ell_list) # Flatten tensor axes shape = gdata.shape - temp = gdata.reshape((-1,)+shape[rank:]) + temp = gdata.reshape((np.prod(shape[:rank]),)+shape[rank:]) slices = [slice(None) for i in range(temp.ndim)] # Apply Q transformations for each ell to flattened tensor data for ell, m_ind, ell_ind in ell_maps: