Skip to content

Remove array_{repr,str}_builtin functions from strfuncs.c #17138

Closed

Description

@charris

Those two functions depend on the dump_data function, which looks buggy to me, and they are never used in practice as they are overloaded when arrayprint is loaded. And arrayprint itself is loaded when numeric is loaded, which takes place when numpy is loaded. That all looks fishy as heck. I propose that the default ndarray str and repr functions be set to the arrayprint implementations.

The dump_data function could probably be fixed but I don't think it is worth the effort. The current setup dates back to the time when numpy enhancements came in separate modules and all the strings were ascii.

Activity

  1. charris commented on Aug 22, 2020

    @charris
    MemberAuthor

    Note that the trouble began with Python 3 and the change to unicode strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions