[Scipy-tickets] [SciPy] #1378: ndimage.rotate misses some values
SciPy Trac
scipy-tickets@scipy....
Tue May 8 12:04:41 CDT 2012
#1378: ndimage.rotate misses some values
---------------------------+------------------------------------------------
Reporter: tmcookies | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: scipy.ndimage | Version: 0.7.2
Keywords: rotate 3d |
---------------------------+------------------------------------------------
Changes (by jjhelmus):
* cc: jjhelmus@… (added)
Comment:
This come from a bug in ndimage.affine_transform on how in handles
matrices with small close to zero values. The bug is located somewhere in
the NI_GeometricTransform function in ni_interpolation.c. To see this
bug:
{{{
input = np.array([[-1, -1, -1], [0,0,0], [0,0,0]], dtype=np.int64)
matrix = np.array([[-1.0, 0],[0, -1.0]], dtype=np.float64)
a = ndimage.affine_transform(input, matrix, offset = (2,2), cval=99)
matrix[0,1] = 1.6E-16; matrix[1,0] = 1.6E-16
b = ndimage.affine_transform(input, matrix, offset = (2,2), cval=99)
print a
print b
}}}
a is the expected results, b contains cval which indicates that "points
outside the boundaries" were detected. I believe this is being applied by
CASE_INTERP_OUT_INT on line 624 of ni_interpolation.c but I do not
understand why these value are being changed.
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1378#comment:1>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list