Commit ea821ac
committed
fix numpy 2.0 int32 scalars to_bytes() error
- in NumPy 2.0, int32 scalars to_bytes() fails with 'AttributeError: 'numpy.int32' object has no attribute 'to_bytes''
- this is because of stricter handling of types in Numpy 2.0 than NumPy 1.x
- cast numpy.int32 to a native Python int before calling to_bytes()1 parent c6cddec commit ea821ac
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
0 commit comments