Open
Description
While testing the Euler characteristic computation function, nipy.algorithms.statistics.intvol.EC2d
, I found some unexpected behavior that could be reduced to the following :
In [2]: import numpy as np
In [3]: from nipy.algorithms.statistics.intvol import EC2d
In [4]: a = np.ones(shape=(3, 3), dtype='int'); print a, EC2d(a)
[[1 1 1]
[1 1 1]
[1 1 1]] -1
In [5]: a[0, 0] = 0; print a, EC2d(a)
[[0 1 1]
[1 1 1]
[1 1 1]] 1
In [6]: a[0, 0] = 1; a[-1, 0] = 0; print a, EC2d(a)
[[1 1 1]
[1 1 1]
[0 1 1]] -1
Is that a expected consequence of those functions being approximate? Thanks for your help and sorry if I am misunderstanding the intended purpose of the functions.
Metadata
Metadata
Assignees
Labels
No labels