On Thu, 05 Dec 2013, Nikolaas N. Oosterhof wrote:

>    In mvpa2/support/nibabel/surf.py:

>  > @@ -1380,7 +1389,7 @@ def getld(n):
>  >          if self.same_topology(highres):
>  >              d = np.sum((x - y) ** 2, axis=1) ** .5

>  > -            if all(d < epsilon):
>  > +            if all(d[-np.isnan(d)] < epsilon):

>    Re reasonable choice for '-' (let's call it 'neg'):

>    1) neg should not be the identity.
>    2) neg(neg(x)) should be equal to x.

>    This only leaves neg(True)=False and neg(False)=True for reasonable
>    implementations of neg.

>    As the numpy boolean array can only contain True and False it should be
>    fine.

but why to obfuscate the code instead of making it more
conventional (never saw use of - this way, since everyone uses ~ or
logical_not) /easy to comprehend????

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate,     Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik