Skip to content

Commit 14f9ace

Browse files
committed
fix: NaN -> nan
1 parent fdeeebc commit 14f9ace

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/fmri/operators/gradient.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ def __init__(self, linear_op, fourier_op, verbose=0, **kwargs):
219219
self.linear_op = linear_op
220220
n_channels = fourier_op.n_coils if not fourier_op.uses_sense else 1
221221
coef = linear_op.op(np.squeeze(np.zeros((n_channels, *fourier_op.shape))))
222+
# Try the reverse:
223+
adj_coeffs = linear_op.adj_op(coef)
222224
self.linear_op_coeffs_shape = coef.shape
223225
self.shape = coef.shape
224226
super().__init__(

src/fmri/operators/weighted.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def wavelet_noise_estimate(wavelet_coeffs, coeffs_shape, sigma_est):
237237
xp = get_array_module(wavelet_coeffs)
238238

239239
sigma_ret = xp.ones(len(coeffs_shape))
240-
sigma_ret[0] = xp.NaN
240+
sigma_ret[0] = xp.nan
241241
start = 0
242242
stop = 0
243243
if sigma_est is None:
@@ -263,7 +263,7 @@ def wavelet_noise_estimate(wavelet_coeffs, coeffs_shape, sigma_est):
263263
start = stop
264264
elif sigma_est == "global":
265265
sigma_ret *= _sigma_mad(wavelet_coeffs[-np.prod(coeffs_shape[-1]) :])
266-
sigma_ret[0] = xp.NaN
266+
sigma_ret[0] = np.nan
267267
return sigma_ret
268268

269269

0 commit comments

Comments
 (0)