You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RF: Remove unnecessary call to asbytes for b-prepended strings
Remove unnecessary call to `asbytes` for `b`-prepended strings: strings
prepended with `b` are already treated as bytes literals:
- `TckFile.MAGIC_NUMBER` is b'mrtrix tracks'
- `TrkFile.MAGIC_NUMBER` is b'TRACK'
Documentation:
https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
Fixes:
```
/home/runner/work/nibabel/nibabel/nibabel/streamlines/tests/test_streamlines.py:9:
DeprecationWarning: `np.compat`, which was used during the Python 2 to 3 transition,
is deprecated since 1.26.0, and will be removed
from numpy.compat.py3k import asbytes
```
raised for example at:
https://github.com/nipy/nibabel/actions/runs/9637811213/job/26577586721#step:7:178
0 commit comments