Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Deprecate is_string_like #7835

Closed
Closed
Milestone
@anntzer

Description

@anntzer

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 foris_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 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 byisinstance(obj, six.string_types) (possiblyisinstance(obj, (six.string_types, six.binary_type)) depending on the case), which is much more explicit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp