Example #1
0
def isreal(dt):
    """Check if a datashape is numeric and real.

    Example
    -------
    >>> isreal('int32')
    True
    >>> isreal('float64')
    True
    >>> isreal('string')
    False
    >>> isreal('complex64')
    False
    """
    dt = launder(dt)
    return isinstance(dt, Unit) and dt in real
def isreal(dt):
    """Check if a datashape is numeric and real.

    Example
    -------
    >>> isreal('int32')
    True
    >>> isreal('float64')
    True
    >>> isreal('string')
    False
    >>> isreal('complex64')
    False
    """
    dt = launder(dt)
    return isinstance(dt, Unit) and dt in real
Example #3
0
def isreal(dt):
    dt = launder(dt)
    return isinstance(dt, Unit) and dt in real