Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

ENH: add __name__ attribue to ufuncs #55

Merged
merged 1 commit into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions numpy-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,8 @@ little_endian: int
tracemalloc_domain: int

class ufunc:
@property
def __name__(self) -> str: ...
def __call__(
self,
*args: _ArrayLike,
Expand Down
1 change: 1 addition & 0 deletions tests/pass/ufuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
np.sin(1, extobj=[16, 1, lambda: None])
np.sin(1) + np.sin(1)
np.sin.types[0]
np.sin.__name__