Skip to content

Commit

Permalink
Merge pull request numpy#26946 from jorenham/add-missing-typecode-ann…
Browse files Browse the repository at this point in the history
…otations

TYP: Add missing typecodes in ``numpy._core.numerictypes.typecodes``
  • Loading branch information
seberg authored Jul 15, 2024
2 parents caf81c7 + dab253e commit 3724ec3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions numpy/_core/numerictypes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ _SCT = TypeVar("_SCT", bound=generic)

class _TypeCodes(TypedDict):
Character: L['c']
Integer: L['bhilqp']
UnsignedInteger: L['BHILQP']
Integer: L['bhilqnp']
UnsignedInteger: L['BHILQNP']
Float: L['efdg']
Complex: L['FDG']
AllInteger: L['bBhHiIlLqQpP']
AllInteger: L['bBhHiIlLqQnNpP']
AllFloat: L['efdgFDG']
Datetime: L['Mm']
All: L['?bhilqpBHILQPefdgFDGSUVOMm']
All: L['?bhilqnpBHILQNPefdgFDGSUVOMm']

__all__: list[str]

Expand Down
2 changes: 1 addition & 1 deletion numpy/typing/tests/data/reveal/numerictypes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ assert_type(np.bool_, type[np.bool])

assert_type(np.typecodes["Character"], Literal["c"])
assert_type(np.typecodes["Complex"], Literal["FDG"])
assert_type(np.typecodes["All"], Literal["?bhilqpBHILQPefdgFDGSUVOMm"])
assert_type(np.typecodes["All"], Literal["?bhilqnpBHILQNPefdgFDGSUVOMm"])

0 comments on commit 3724ec3

Please sign in to comment.