GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — BUG: fix leak in reductions when a ufunc override errors or is not found by ikrommyd · Pull Request #31731 · numpy/numpy Conversation
|
|
Just pasting the results of profiling the snippet above with memray (with native traces too) on main: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yeah, just out of principle. Seems like a simple test to add and I expect leak sanitizer or so will find it even without a loop. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Iason Krommydas <[email protected]>
Done |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Iason Krommydas <[email protected]>
|
The BLAS tests failure should be unrelated |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, for adding the test, good enough, let's put it in.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| a = A() | ||
| assert_raises(TypeError, np.add.reduce, a) | ||
| assert_raises(TypeError, np.add.accumulate, a) | ||
| assert_raises(TypeError, np.add.reduceat, a, [0]) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
N.B. I generally prefer with pytest.raises() even if it a lot of old tests use assert_raises.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks. Noted for the future. I intuitively tend to follow existing patterns and I literally just copied it from the tests right above it
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…und (#31731) Signed-off-by: Iason Krommydas <[email protected]>
BUG: fix leak in reductions when a ufunc override errors or is not found (#31731)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
BUG: Reference leak in PyUFunc_GenericReduction on CheckOverride error
There was an error while loading. Please reload this page.