def _isstring ( dtype ) : return dtype . type == numpy . unicode_ or dtype . type == numpy . string_
how to determine a dtype is numeric or not python
Given a numpy dtype determines whether it is a string . Returns True if the dtype is string or unicode .
def _isstring(dtype):
    """Given a numpy dtype, determines whether it is a string. Returns True
    if the dtype is string or unicode.
    """
    return dtype.type == numpy.unicode_ or dtype.type == numpy.string_