Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
seberg merged 18 commits intonumpy:mainfromseberg:clean-wrapping
Jan 20, 2024
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`
sebergNov 10, 2023
e6fdbdc
BUG: Fix niche bug in rounding.
sebergDec 17, 2023
b9fb29e
MAINT: Adjust __array_wrap__ in code and tests (also deprecation test)
sebergDec 17, 2023
3c51b0f
MAINT: Use/move the simplest C-wrapping also
sebergDec 17, 2023
ad0e168
DOC: Update doc and add release note
sebergDec 17, 2023
09ba729
STY: Make linter happy in old tests
sebergDec 17, 2023
2ef4302
MAINT: Silence GCC warning (value cannot really be used uninitialized)
sebergDec 17, 2023
411e2db
MAINT: Small style fixes
sebergDec 18, 2023
4846b1d
BUG: Fix reference leak in ufunc array-wrapping
sebergDec 18, 2023
a2cee02
BUG: Fix leak for result arrays in all ufunc calls
sebergDec 19, 2023
3caf819
Ensure we try passing context and address related smaller review comm…
sebergJan 17, 2024
5d2c04c
Merge branch 'main' into clean-wrapping
sebergJan 17, 2024
181a376
Ensure we don't try `context=None` and expand code comment
sebergJan 17, 2024
8621eee
Rely on return_scalar always being right (and style nit)
sebergJan 17, 2024
3122538
Remove outdated comments as per review
sebergJan 17, 2024
497c535
Let's just undo force-wrap for now for reductions (its a change...)
sebergJan 17, 2024
f50ff16
ENH: Chain the original error when the deprecationwarning is raised
sebergJan 19, 2024
606f5c3
BUG,MAINT: Address Martens review comments
sebergJan 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
STY: Make linter happy in old tests
  • Loading branch information
@seberg
seberg committedDec 17, 2023
commit09ba729aaf3eb5bd79404e2c5a0b22bcbbdf6431
4 changes: 4 additions & 0 deletionsnumpy/_core/tests/test_umath.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3006,16 +3006,20 @@ def test_wrap_out(self):
class StoreArrayPrepareWrap(np.ndarray):
_wrap_args = None
_prepare_args = None

def __new__(cls):
return np.zeros(()).view(cls)

def __array_wrap__(self, obj, context, return_scalar):
self._wrap_args = context[1]
return obj

@property
def args(self):
# We need to ensure these are fetched at the same time, before
# any other ufuncs are called by the assertions
return self._wrap_args

def __repr__(self):
return "a" # for short test output

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp