Skip to content

Commit fb76411

Browse files
committed
BUG: Fix future warning on use of np.issubdtype.
Fix future warning on use of `np.issubdtype`. Fixes: ``` /home/travis/build/nipy/dipy/venv/lib/python3.4/site-packages/nibabel/streamlines/array_sequence.py:23: FutureWarning: Conversion of the second argument of issubdtype from `bool` to `np.generic` is deprecated. In future, it will be treated as `np.bool_ == np.dtype(bool).type`. ``` observed in projects using Nibabel, e.g. DIPY: https://travis-ci.org/nipy/dipy/jobs/471947136 More information about the issue and the fix at: numpy/numpy#2334 numpy/numpy#9505
1 parent d38f9d6 commit fb76411

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/streamlines/array_sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def is_array_sequence(obj):
2020
def is_ndarray_of_int_or_bool(obj):
2121
return (isinstance(obj, np.ndarray) and
2222
(np.issubdtype(obj.dtype, np.integer) or
23-
np.issubdtype(obj.dtype, np.bool)))
23+
np.issubdtype(obj.dtype, np.bool_)))
2424

2525

2626
class _BuildCache(object):

0 commit comments

Comments
 (0)