We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ed2e6d commit bbfd009Copy full SHA for bbfd009
nibabel/casting.py
@@ -467,6 +467,11 @@ def int_to_float(val, flt_type):
467
-------
468
f : numpy scalar
469
of type `flt_type`
470
+
471
+ Examples
472
+ --------
473
+ >>> int_to_float(1, np.float32)
474
+ 1.0
475
"""
476
return flt_type(val)
477
nibabel/conftest.py
@@ -24,7 +24,7 @@ def max_digits():
24
orig_max_str_digits = sys.get_int_max_str_digits()
25
yield sys.set_int_max_str_digits
26
sys.set_int_max_str_digits(orig_max_str_digits)
27
- except AttributeError:
+ except AttributeError: # pragma: no cover
28
# Nothing to do for versions of Python that lack these methods
29
# They were added as DoS protection in Python 3.11 and backported to
30
# some other versions.
0 commit comments