8000 Add type hinting for numeric.py by johanvergeer · Pull Request #38 · numpy/numpy-stubs · GitHub
[go: up one dir, main page]

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

Add type hinting for numeric.py #38

Merged
merged 6 commits into from
Jan 14, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add core/numerictypes.pyi
  • Loading branch information
johanvergeer committed Nov 24, 2019
commit 015f47bada8be38a6a5748cf514ee6fdc7f0c218
20 changes: 20 additions & 0 deletions numpy-stubs/core/numerictypes.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from typing import Any, Optional, Union, Tuple, List

from numpy import dtype

def maximum_sctype(t: dtype) -> dtype: ...
def issctype(rep: Any) -> bool: ...
def obj2sctype(rep: Any, default: Optional[Any] = ...) -> type: ...
def issubclass_(
arg1: type, arg2: Union[type, Tuple[Union[type, Tuple], ...]]
) -> bool: ...
def issubsctype(
arg1: type, arg2: Union[type, Tuple[Union[type, Tuple], ...]]
) -> bool: ...
def issubdtype(
arg1: Union[object, type], arg2: Union[type, Tuple[Union[type, Tuple], ...]]
) -> bool: ...
def sctype2char(sctype: Any) -> str: ...
def find_common_type(
array_types: Union[dtype, List[dtype]], scalar_types: Union[dtype, List[dtype]]
) -> dtype: ...
0