Skip to content

Commit

Permalink
Update src/nemos/basis/_basis.py
Browse files Browse the repository at this point in the history
Co-authored-by: William F. Broderick <[email protected]>
BalzaniEdoardo and billbrod authored Dec 12, 2024
1 parent ef595f0 commit 5fadbb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nemos/basis/_basis.py
Original file line number Diff line number Diff line change
@@ -87,8 +87,8 @@ def min_max_rescale_samples(
sample_pts[(sample_pts < vmin) | (sample_pts > vmax)] = np.nan
sample_pts -= vmin

# do not normalize if samples contain a single value
scaling = np.asarray(vmax - vmin)
# do not normalize if samples contain a single value (in which case vmax=vmin)
scaling[scaling == 0] = 1.0
sample_pts /= scaling

0 comments on commit 5fadbb5

Please sign in to comment.