Skip to content

Alternative to #9332 - #9776

Closed
eric-wieser wants to merge 3 commits into
numpy:masterfrom
eric-wieser:0d-str-alternative
Closed

eric-wieser wants to merge 3 commits into
numpy:masterfrom
eric-wieser:0d-str-alternative

Conversation

@eric-wieser

Copy link
Copy Markdown
Member

One extra commit on top of #9332, that protects str(0darr) against np.set_string_function, and leaves the style argument deprecated.

ahaldane and others added 3 commits September 26, 2017 18:34
The str of 0d arrays now returns `str(a[()])` like scalars, and the
repr returns `'array(' + formatter(a[()]) + ')'` like ndarrays.
The default implementation of str and repr for user-defined types is
removed. Fixes numpy#1415
@eric-wieser

Copy link
Copy Markdown
Member Author

This is essentially the approach taken by #9201, which works when applied on top of #9332.

@eric-wieser

Copy link
Copy Markdown
Member Author

Actually, this is so similar to #9201 that I'm gonna go ahead and update that one

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants