Esempio n. 1
0
def isfinite(a):
    """Identifies elements of an array which are neither nan nor infinity."""
    return _na.logical_not(isinf(a) | isnan(a))
Esempio n. 2
0
def setnan(a, value):
    """setnan sets elements of 'a' which are NANs to 'value' instead.
    DEPRECATED:  use 'a[getnan(a)] = value'  instead.
    """
    a[isnan(a)] = value
Esempio n. 3
0
def getnan(a):
    """getnan returns a tuple of indices of 'a' where the values are not-a-numbers"""
    return _na.nonzero(isnan(a))
Esempio n. 4
0
def isfinite(a):
    """Identifies elements of an array which are neither nan nor infinity."""
    return _na.logical_not(isinf(a)| isnan(a))
Esempio n. 5
0
def setnan(a, value):
    """setnan sets elements of 'a' which are NANs to 'value' instead.
    DEPRECATED:  use 'a[getnan(a)] = value'  instead.
    """
    a[isnan(a)]= value
Esempio n. 6
0
def getnan(a):
    """getnan returns a tuple of indices of 'a' where the values are not-a-numbers"""
    return _na.nonzero(isnan(a))