Skip to content

Commit 516efa1

Browse files
committed
DOCTEST: Fix np.float uses in the doctests
1 parent e732727 commit 516efa1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

nibabel/volumeutils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -601,20 +601,20 @@ def array_to_file(data, fileobj, out_dtype=None, offset=0,
601601
--------
602602
>>> from io import BytesIO
603603
>>> sio = BytesIO()
604-
>>> data = np.arange(10, dtype=np.float)
605-
>>> array_to_file(data, sio, np.float)
604+
>>> data = np.arange(10, dtype=np.float64)
605+
>>> array_to_file(data, sio, np.float64)
606606
>>> sio.getvalue() == data.tobytes('F')
607607
True
608608
>>> _ = sio.truncate(0); _ = sio.seek(0) # outputs 0
609609
>>> array_to_file(data, sio, np.int16)
610610
>>> sio.getvalue() == data.astype(np.int16).tobytes()
611611
True
612612
>>> _ = sio.truncate(0); _ = sio.seek(0)
613-
>>> array_to_file(data.byteswap(), sio, np.float)
613+
>>> array_to_file(data.byteswap(), sio, np.float64)
614614
>>> sio.getvalue() == data.byteswap().tobytes('F')
615615
True
616616
>>> _ = sio.truncate(0); _ = sio.seek(0)
617-
>>> array_to_file(data, sio, np.float, order='C')
617+
>>> array_to_file(data, sio, np.float64, order='C')
618618
>>> sio.getvalue() == data.tobytes('C')
619619
True
620620
"""
@@ -1082,9 +1082,9 @@ def scale_min_max(mn, mx, out_type, allow_intercept):
10821082
10831083
Returns
10841084
-------
1085-
scalefactor : numpy scalar, dtype=np.maximum_sctype(np.float)
1085+
scalefactor : numpy scalar, dtype=np.maximum_sctype(np.float64)
10861086
scalefactor by which to divide data after subtracting intercept
1087-
intercept : numpy scalar, dtype=np.maximum_sctype(np.float)
1087+
intercept : numpy scalar, dtype=np.maximum_sctype(np.float64)
10881088
value to subtract from data before dividing by scalefactor
10891089
10901090
Examples

0 commit comments

Comments
 (0)