Skip to content

Commit e6d90df

Browse files
committed
BF: ignore dtype for some doctests
Some doctests on 32 bit generate dtype identifiers; use doctest machinery to ignore these.
1 parent 4c87cf0 commit e6d90df

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

nipy/algorithms/statistics/rft.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def __add__(self, other):
224224
--------
225225
>>> b = ECquasi([3,4,20], m=30, exponent=4)
226226
>>> c = ECquasi([1], m=30, exponent=4)
227-
>>> b+c
227+
>>> b+c #doctest: +IGNORE_DTYPE
228228
ECquasi(array([ 3, 4, 21]), m=30.000000, exponent=4.000000)
229229
230230
>>> d = ECquasi([1], m=30, exponent=3)
@@ -325,7 +325,7 @@ def __sub__(self, other):
325325
--------
326326
>>> b = ECquasi([3,4,20], m=30, exponent=4)
327327
>>> c = ECquasi([1,2], m=30, exponent=4)
328-
>>> print b-c
328+
>>> print b-c #doctest: +IGNORE_DTYPE
329329
ECquasi(array([ 3, 3, 18]), m=30.000000, exponent=4.000000)
330330
"""
331331
return self + (other * -1)
@@ -353,7 +353,7 @@ def deriv(self, m=1):
353353
Examples
354354
--------
355355
>>> a = ECquasi([3,4,5])
356-
>>> a.deriv(m=2)
356+
>>> a.deriv(m=2) #doctest: +IGNORE_DTYPE
357357
ECquasi(array([6]), m=inf, exponent=0.000000)
358358
359359
>>> b = ECquasi([3,4,5], m=10, exponent=3)

nipy/core/reference/coordinate_map.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,11 @@ def __call__(self, x):
390390
>>> function = lambda x:x+1
391391
>>> inverse = lambda x:x-1
392392
>>> cm = CoordinateMap(input_cs, output_cs, function, inverse)
393-
>>> cm([2,3,4])
394-
array([3, 4, 5])
393+
>>> cm([2.,3.,4.])
394+
array([ 3., 4., 5.])
395395
>>> cmi = cm.inverse()
396-
>>> cmi([2,6,12])
397-
array([ 1, 5, 11])
396+
>>> cmi([2., 6. ,12.])
397+
array([ 1., 5., 11.])
398398
"""
399399
x = np.asanyarray(x)
400400
out_shape = (self.function_range.ndim,)
@@ -880,7 +880,7 @@ def __call__(self, x):
880880
... [0,0,1,1],
881881
... [0,0,0,1]])
882882
>>> affine_transform = AffineTransform(input_cs, output_cs, affine)
883-
>>> affine_transform([2,3,4])
883+
>>> affine_transform([2,3,4]) #doctest: +IGNORE_DTYPE
884884
array([3, 4, 5])
885885
>>> affine_transform_inv = affine_transform.inverse()
886886
>>> # Its inverse has a matrix of np.float

0 commit comments

Comments
 (0)