Skip to content

Commit e3cab89

Browse files
csskenekburns
authored andcommitted
Attempt to fix regularity recombination when array has size 0
1 parent 51ca757 commit e3cab89

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dedalus/core/basis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,7 +3600,7 @@ def forward_regularity_recombination(self, tensorsig, axis, gdata, ell_maps):
36003600
Q = self.radial_recombinations(tensorsig, ell_list)
36013601
# Flatten tensor axes
36023602
shape = gdata.shape
3603-
temp = gdata.reshape((-1,)+shape[rank:])
3603+
temp = gdata.reshape((np.prod(shape[:rank]),)+shape[rank:])
36043604
slices = [slice(None) for i in range(temp.ndim)]
36053605
# Apply Q transformations for each ell to flattened tensor data
36063606
for ell, m_ind, ell_ind in ell_maps:
@@ -3617,7 +3617,7 @@ def backward_regularity_recombination(self, tensorsig, axis, gdata, ell_maps):
36173617
Q = self.radial_recombinations(tensorsig, ell_list)
36183618
# Flatten tensor axes
36193619
shape = gdata.shape
3620-
temp = gdata.reshape((-1,)+shape[rank:])
3620+
temp = gdata.reshape((np.prod(shape[:rank]),)+shape[rank:])
36213621
slices = [slice(None) for i in range(temp.ndim)]
36223622
# Apply Q transformations for each ell to flattened tensor data
36233623
for ell, m_ind, ell_ind in ell_maps:

0 commit comments

Comments
 (0)