Skip to content

Commit 439201c

Browse files
committed
DOCTEST: Use legacy float array printing for now
1 parent 9b8c4d9 commit 439201c

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

nibabel/affines.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
33
""" Utility routines for working with points and affine transforms
4+
5+
.. testsetup::
6+
7+
>>> np.set_printoptions(sign='legacy')
48
"""
59

610
import numpy as np

nibabel/casting.py

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
33
Most routines work round some numpy oddities in floating point precision and
44
casting. Others work round numpy casting to and from python ints
5+
6+
.. testsetup::
7+
8+
>>> np.set_printoptions(sign='legacy')
59
"""
610

711
from numbers import Integral

nibabel/nicom/dwiparams.py

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
1919
B ~ (q_est . q_est.T) / norm(q_est)
2020
21+
.. testsetup::
22+
23+
>>> np.set_printoptions(sign='legacy')
2124
'''
2225
import numpy as np
2326
import numpy.linalg as npl

nibabel/nifti1.py

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
''' Read / write access to NIfTI1 image format
1010
1111
NIfTI1 format defined at http://nifti.nimh.nih.gov/nifti-1/
12+
13+
.. testsetup::
14+
15+
>>> np.set_printoptions(sign='legacy')
1216
'''
1317
from __future__ import division, print_function
1418
import warnings

nibabel/quaternions.py

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
>>> M = quat2mat(q) # from this module
2424
>>> vec = np.array([1, 2, 3]).reshape((3,1)) # column vector
2525
>>> tvec = np.dot(M, vec)
26+
27+
.. testsetup::
28+
29+
>>> np.set_printoptions(sign='legacy')
2630
'''
2731

2832
import math

0 commit comments

Comments
 (0)