Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11.9k
API,MAINT: Reorganize array-wrap calling and introducereturn_scalar#25409
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
18 commits Select commitHold shift + click to select a range
0ba20d7 API: Reorganize `__array_wrap__` and add `return_scalar=False`
seberge6fdbdc BUG: Fix niche bug in rounding.
sebergb9fb29e MAINT: Adjust __array_wrap__ in code and tests (also deprecation test)
seberg3c51b0f MAINT: Use/move the simplest C-wrapping also
sebergad0e168 DOC: Update doc and add release note
seberg09ba729 STY: Make linter happy in old tests
seberg2ef4302 MAINT: Silence GCC warning (value cannot really be used uninitialized)
seberg411e2db MAINT: Small style fixes
seberg4846b1d BUG: Fix reference leak in ufunc array-wrapping
seberga2cee02 BUG: Fix leak for result arrays in all ufunc calls
seberg3caf819 Ensure we try passing context and address related smaller review comm…
seberg5d2c04c Merge branch 'main' into clean-wrapping
seberg181a376 Ensure we don't try `context=None` and expand code comment
seberg8621eee Rely on return_scalar always being right (and style nit)
seberg3122538 Remove outdated comments as per review
seberg497c535 Let's just undo force-wrap for now for reductions (its a change...)
sebergf50ff16 ENH: Chain the original error when the deprecationwarning is raised
seberg606f5c3 BUG,MAINT: Address Martens review comments
sebergFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
MAINT: Use/move the simplest C-wrapping also
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit3c51b0f804601ba54ad0a73d6cc6145644a5eca0
There are no files selected for viewing
5 changes: 4 additions & 1 deletionnumpy/_core/src/multiarray/arrayobject.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
24 changes: 21 additions & 3 deletionsnumpy/_core/src/multiarray/arraywrap.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletionsnumpy/_core/src/multiarray/arraywrap.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -16,9 +16,15 @@ npy_apply_wrap( | ||
| PyObject *wrap, PyObject *wrap_type, | ||
| NpyUFuncContext *context, npy_bool return_scalar, npy_bool force_wrap); | ||
| NPY_NO_EXPORT PyObject * | ||
| npy_apply_wrap_simple(PyArrayObject *arr_of_subclass, PyArrayObject *towrap); | ||
| NPY_NO_EXPORT int | ||
| npy_find_array_wrap( | ||
| int nin, PyObject *const *inputs, | ||
| PyObject **out_wrap, PyObject **out_wrap_type); | ||
| #endif /* NUMPY_CORE_SRC_MULTIARRAY_ARRAYWRAP_H_ */ | ||
| ||
23 changes: 0 additions & 23 deletionsnumpy/_core/src/multiarray/ctors.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4073,26 +4073,3 @@ _array_fill_strides(npy_intp *strides, npy_intp const *dims, int nd, size_t item | ||
| } | ||
| return; | ||
| } | ||
7 changes: 0 additions & 7 deletionsnumpy/_core/src/multiarray/ctors.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletionsnumpy/_core/src/multiarray/shape.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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.