-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Bug fix #3593 - approx repr in a 0-d numpy array #3615
Bug fix #3593 - approx repr in a 0-d numpy array #3615
Conversation
@nicoddemus please review |
@nicoddemus
So, how do I have to proceed in this case? |
use pre-commit - it has the excludes defined |
@RonnyPfannschmidt it gave me the same thing...
|
@marcelotrevisani but it should also leave the changed files in the worktree to review/commit/amend |
Are this errors related to #3614 ? |
@marcelotrevisani we pin the black version to get consistency across the codebase, i beleive the difference you see is due to black version differences |
also yes, #3614 is related |
So, do I have to run |
So, the CI is failing and I think it's related to the issue #2111
|
test_repr_string sorts that out using a variable and formatting, i propose moving the str tests over there |
@RonnyPfannschmidt got it, I will change that later. However this is still failing for py27-numpy in the CI, with the same error. I will take a look after work, but do you have a hint for this case? |
@marcelotrevisani not off hand, im unfamiliar with approx (i have never needed/used it myself) |
If the user pass as a expected value a numpy array created like numpy.array(5); it will creates an array with one element without shape, when used with approx it will raise an error 'TypeError: iteration over a 0-d array'
great work, thanks, i will merge this, then investigate the fallout it causes fore the black upgrade by @asottile |
If the user pass as a expected value a numpy array created like
numpy.array(5); it will creates an array with one element without shape,
when used with approx it will raise an error
'TypeError: iteration over a 0-d array'
Thanks for submitting a PR, your contribution is really appreciated!
Here's a quick checklist that should be present in PRs (you can delete this text from the final description, this is
just a guideline):
changelog
folder, with a name like<ISSUE NUMBER>.<TYPE>.rst
. See changelog/README.rst for details.master
branch for bug fixes, documentation updates and trivial changes.features
branch for new features and removals/deprecations.Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please:
AUTHORS
in alphabetical order;