This content refers to an unreleased development version of PyMVPA
To provide the most recent news and documentation www.pymvpa.org reflects the development 0.6 series of PyMVPA. If you are interested in the documentation of the previous stable 0.4 series of PyMVPA, please visit v04.pymvpa.org.

mvpa.misc.support.array_whereequal

mvpa.misc.support.array_whereequal(a, x)

Reliable comparison for numpy.ndarray

numpy.ndarray (as of 1.5.0.dev) fails to compare tuples in array of dtype object, e.g.

>>> import numpy as np; a=np.array([1, (0,1)], dtype=object); print a == (0,1),  a[1] == (0,1)
[False False] True

This function checks if dtype is object and just does list comprehension in that case

NeuroDebian

NITRC-listed