Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: np.void(b'test') enters recursion loop in repr #9345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eric-wieser opened this issue Jul 1, 2017 · 5 comments
Closed

BUG: np.void(b'test') enters recursion loop in repr #9345

eric-wieser opened this issue Jul 1, 2017 · 5 comments

Comments

@eric-wieser
Copy link
Member

Regression in #8983, perhaps. @ahaldane?

@ahaldane
Copy link
Member

ahaldane commented Jul 1, 2017

Yes, I have come across some infinite recurions as a result of #8983 too. But I didn't want to work on a fix yet since I think #8981 (perhaps also #9332) will fix it, hopefully soon.

@ahaldane
Copy link
Member

ahaldane commented Jul 1, 2017

LGTM. Either update or let me know you don't want to change the test, and I think we can merge.

wrong issue, sorry

@mattip
Copy link
Member

mattip commented Sep 6, 2017

Any progress on this? It seems like a serious regression

@mattip
Copy link
Member

mattip commented Sep 6, 2017

This issue is causing a RuntimeError('maximum recursion depth exceeded',) when calling testing.assert_equal on a np.void in the build_err_msg function, i.e. in test_scalar_copy from test_regression.py which was added lately. Lucky for CPython that can be caught, unfortunately it crashes the PyPy interpreter.

@eric-wieser
Copy link
Member Author

I think some serious thought needs to go into which code has the job of printing arrays and scalars. We're in this mess because:

  • Some scalars do `repr(np.array(self))
  • Some arrays do repr(arr[idx]) on each item

Of course, this gives a potential for co-recursion.
Unfortunately, in 1.13, the break in this co-recursion depended on the data type, and the regression accidently assumed it was cut in the same place each time
It'd be great if we could make this link unconditionally cut.

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

No branches or pull requests

3 participants