We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 53f9cdb + b0f056f commit fea80fdCopy full SHA for fea80fd
1 file changed
pywt/_multilevel.py
@@ -1072,7 +1072,10 @@ def ravel_coeffs(coeffs, axes=None):
1072
if np.any([d is None for d in coeff_dict.values()]):
1073
raise ValueError("coeffs_to_array does not support missing "
1074
"coefficients.")
1075
- for key, d in coeff_dict.items():
+ # sort to make sure key order is consistent across Python versions
1076
+ keys = sorted(coeff_dict.keys())
1077
+ for key in keys:
1078
+ d = coeff_dict[key]
1079
sl = slice(offset, offset + d.size)
1080
offset += d.size
1081
coeff_arr[sl] = d.ravel()
0 commit comments