GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TYP: Type ``MaskedArray.__{add,radd,sub,rsub}__`` by MarcoGorelli · Pull Request #29012 · numpy/numpy

TYP: Type MaskedArray.__{add,radd,sub,rsub}__ #29012

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.

Sign up for GitHub

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

Merged
jorenham merged 8 commits into numpy:main from MarcoGorelli:ma-arithmetic
May 28, 2025

Uh oh!

There was an error while loading. Please reload this page.

Merged

TYP: Type MaskedArray.__{add,radd,sub,rsub}__ #29012

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit Hold shift + click to select a range
9bc7b74
TYP: Type ``MaskedArray.__{add,radd,sub,rsub}__``
MarcoGorelli May 20, 2025
02fbee2
Merge remote-tracking branch 'upstream/main' into ma-arithmetic
MarcoGorelli May 20, 2025
5889f5c
"in-sync" comment in test, copy comment in __radd__, use _AnyShape
MarcoGorelli May 20, 2025
d605c2f
noop
MarcoGorelli May 21, 2025
dd7293b
Merge remote-tracking branch 'upstream/main' into ma-arithmetic
MarcoGorelli May 22, 2025
93edb06
Merge remote-tracking branch 'upstream/main' into ma-arithmetic
MarcoGorelli May 27, 2025
3158d6a
keep in sync comments
MarcoGorelli May 28, 2025
c8bceae
Merge remote-tracking branch 'upstream/main' into ma-arithmetic
MarcoGorelli May 28, 2025
File filter
Filter by extension

Clear filters
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
Prev Previous commit
Next Next commit
"in-sync" comment in test, copy comment in __radd__, use _AnyShape
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@MarcoGorelli
MarcoGorelli committed May 20, 2025
commit 5889f5c8ea40db29b5b62bc68e8f766049bc5b7d

There are no files selected for viewing

6 changes: 3 additions & 3 deletions 6 numpy/ma/core.pyi
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,14 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
self: MaskedArray[Any, dtypes.StringDType],
other: _ArrayLikeStr_co | _ArrayLikeString_co,
/,
) -> MaskedArray[tuple[Any, ...], dtypes.StringDType]: ...
) -> MaskedArray[_AnyShape, dtypes.StringDType]: ...
@overload
def __add__(self: _MaskedArray[object_], other: Any, /) -> Any: ...
@overload
def __add__(self: _MaskedArray[Any], other: _ArrayLikeObject_co, /) -> Any: ...

# Keep in sync with `ndarray.__radd__`
@overload
@overload # signature equivalent to __add__
def __radd__(self: _MaskedArray[_NumberT], other: int | np.bool, /) -> MaskedArray[_ShapeT_co, dtype[_NumberT]]: ...
@overload
def __radd__(self: _MaskedArray[_NumberT], other: _ArrayLikeBool_co, /) -> _MaskedArray[_NumberT]: ... # type: ignore[overload-overlap]
Expand Down Expand Up @@ -577,7 +577,7 @@ class MaskedArray(ndarray[_ShapeT_co, _DTypeT_co]):
self: MaskedArray[Any, dtypes.StringDType],
other: _ArrayLikeStr_co | _ArrayLikeString_co,
/,
) -> MaskedArray[tuple[Any, ...], dtypes.StringDType]: ...
) -> MaskedArray[_AnyShape, dtypes.StringDType]: ...
@overload
def __radd__(self: _MaskedArray[object_], other: Any, /) -> Any: ...
@overload
Expand Down
1 change: 1 addition & 0 deletions 1 numpy/typing/tests/data/reveal/ma.pyi
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ assert_type(AR_LIKE_dt64 + MAR_o, Any)
assert_type(AR_LIKE_o + MAR_o, Any)

# Masked Array subtraction
# Keep in sync with numpy/typing/tests/data/reveal/arithmetic.pyi

assert_type(MAR_number - AR_number, MaskedArray[np.number])

Expand Down
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.