This issue is similar to #7795 ("is_numlike should be deprecated and replaced by the correct isinstance calls"): cbook.is_string_like returns True for 0-dimensional masked arrays of string dtype (but not regular arrays...), but testing for is_string_like is often followed by calling of string methods (.lower(), etc.) on the object, or passing the object to, say, open() -- neither of which work with masked arrays of string dtype. (check yourself with git grep -A2 'is_string_like(')
In other words the actual semantics of the function simply do not match how it is used.
Most of these calls should probably be replaced by isinstance(obj, six.string_types) (possibly isinstance(obj, (six.string_types, six.binary_type)) depending on the case), which is much more explicit.
This issue is similar to #7795 ("is_numlike should be deprecated and replaced by the correct isinstance calls"):
cbook.is_string_likereturns True for 0-dimensional masked arrays of string dtype (but not regular arrays...), but testing foris_string_likeis often followed by calling of string methods (.lower(), etc.) on the object, or passing the object to, say,open()-- neither of which work with masked arrays of string dtype. (check yourself withgit grep -A2 'is_string_like(')In other words the actual semantics of the function simply do not match how it is used.
Most of these calls should probably be replaced by
isinstance(obj, six.string_types)(possiblyisinstance(obj, (six.string_types, six.binary_type))depending on the case), which is much more explicit.