-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
TST: Enable NPY_RELAXED_STRIDES_DEBUG environment variable. #8999
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a release note, but otherwise looks good to me.
930b9cd
to
19c968e
Compare
Heh, fair catch ;) Fixed. |
@@ -385,7 +397,7 @@ offset into the file. This is a behaviour change only for offsets | |||
greater than ``mmap.ALLOCATIONGRANULARITY``. | |||
|
|||
``np.real`` and ``np.imag`` return scalars for scalar inputs | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are now 3 or 4 PRs that make this change...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, one of them has to go first ;) Easy fix on line if homu complains, but now I'm actually curious if it will cause a merge problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, and this one looks the least controversial
doc/release/1.13.0-notes.rst
Outdated
Setting NPY_RELAXED_STRIDES_DEBUG=1 in the enviroment when relaxed stride | ||
checking is enabled will cause numpy to be compiled with affected strides set | ||
to bogus values in order to help smoke out incorrect usage of strides in | ||
downstream projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth explaining what a typical "smoke out" looks like, and specifying that "bogus" means "extremely large".
Could do with a comma after "bogus values", too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be sure. IIRC correctly, the usual is an IndexError but I am not sure.
@matthew-brett If you are building daily wheels for testing purposed you may want to put |
Setting NPY_RELAXED_STRIDES_DEBUG=1 in the enviroment when relaxed stride checking is enabled will cause numpy to be compiled with affected strides set to bogus values in order to help smoke out incorrect usage of strides in downstream projects.
19c968e
to
39a21dd
Compare
--------------------------------------------------------- | ||
Setting NPY_RELAXED_STRIDES_DEBUG=1 in the enviroment when relaxed stride | ||
checking is enabled will cause numpy to be compiled with the affected strides | ||
set to the maximum value of npy_intp in order to help detect invalid usage of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still would like a comma after npy_intp
, but not too important
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a subordinate clause follows an independent clause, a comma is not needed.
I used a comma in the sentence above because the subordinate clause comes first.
Two examples, two cases. Two sentence fragments ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I agree it's not necessary (thanks for the formal explanation though) - but am I right in saying it would be valid?
Probably good to wait for a second opinion from someone who's used this before, but I'd be ok with this being merged as is. |
It was discussed on the list. AFAIK, I'm the only one who has made use of the two options and carrying along a patch to apply to releases was getting old. If Matthew enables the option for his nightly wheel build that is used for testing, there will not be much change. |
Setting NPY_RELAXED_STRIDES_DEBUG=1 in the enviroment when relaxed
stride checking is enabled will cause numpy to be compiled with affected
strides set to bogus values in order to help smoke out incorrect usage
of strides in downstream projects.