The reason will be displayed to describe this comment to others. Learn more.
Doctest does not like splitting lines, and I think a few examples is plenty. BTW, the docstring itself (on lines 5069-5074) is pretty unclear. I think the type signature mini-language is documented elsewhere, perhaps this docstring should point there?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The reason will be displayed to describe this comment to others. Learn more.
Not sure why long lines are an issue, but I agree that this can be short and this seems fine.
Not sure we have a good place to link to (maybe the ufunc registration), but the few who have a reason to look at it, know about it anyway, I think...
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The reason will be displayed to describe this comment to others. Learn more.
N.B.: The previous example says "currently", so I think this is fine, but we shouldn't make promises around this.
(the only true safe thing to do, IMO is to never propagate unless the dtype has custom logic)
FWIW, this works for our numerical dtypes, one already can't expect it to work e.g. with strings.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The reason will be displayed to describe this comment to others. Learn more.
For this one, I think it would be nice to keep the unicode, because users are more likely to see it then not, I believe.
I suspect numpy/conftest.py is read? Maybe we can do p.polynomial.set_default_printstyle("unicode") there to remove windows from the equation?
(I think different defaults is just about bad terminals, which might print oddly if the test fails, but shouldn't influence test results.)
But if this isn't trivial, we can also just do this.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The reason will be displayed to describe this comment to others. Learn more.
I changed it to unicode and checked that it works on my windows 10 machine. I prefer to leave the np.polynomial.set_default_printstyle in the example so it is more obvious there is an alternative. MAybe @rossbar knows why windows defaults to ascii?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The reason will be displayed to describe this comment to others. Learn more.
OK, maybe @rossbar can follow up if he prefers a different approach, would be nice to get this in.
IIRC, some windows terminals (older powershell?) have poor unicode printing support (it may even have just been the font missing symbols).
The overview docs and the docs of set_default_printstyle itself mention it, so I think that setting it globally would be OK, but then those two places should make sure to reset it to whatever it (with a comment that docs use unicode).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
# for doctests, also needs pytz which is in test_requirements
scipy-doctest==1.5.1
scipy-doctest==1.6.0
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.