Commit 798340a
fix: use np.array instead of np.asarray to ensure writable array
np.asarray returns a read-only view when the input dtype already matches,
causing np.nan_to_num(copy=False) to raise ValueError on numpy 1.25+ with
Python 3.11-3.13. np.array always produces a writable copy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent e2e92c4 commit 798340a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
0 commit comments