Skip to content

[Bot] Combine APIs and create typings #64

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 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
170,526 changes: 100,753 additions & 69,773 deletions data/api.json

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions data/typing/numpy.core.records.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,35 @@ def fromarrays(
...


@overload
def fromrecords(recList: List[List[int]], names: List[Literal["c", "b", "a"]]):
"""
usage.matplotlib: 1
"""
...


@overload
def fromrecords(
recList: List[
List[
Literal[
"2014-01-11T00:00:00",
"1976-03-05T00:00:01",
"1983-07-09T17:17:34",
"2054-06-20T14:31:45",
"2000-10-31T11:50:23",
]
]
],
names: List[Literal["a"]],
):
"""
usage.matplotlib: 1
"""
...


def fromrecords(
recList: List[
List[
Expand Down
12 changes: 10 additions & 2 deletions data/typing/numpy.fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ def fft(a: Union[numpy.ndarray, List[float]], n: int = ..., axis: int = ...):


@overload
def fft(a: numpy.ndarray, n: int = ..., axis: int = ...):
def fft(a: numpy.ndarray, n: int, axis: int):
"""
usage.matplotlib: 8
usage.matplotlib: 5
"""
...


@overload
def fft(a: numpy.ndarray):
"""
usage.matplotlib: 3
"""
...

Expand Down
68 changes: 57 additions & 11 deletions data/typing/numpy.lib.index_tricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ def __getitem__(
@overload
def __getitem__(self, _0: slice[int, int, int], /):
"""
usage.matplotlib: 2
usage.matplotlib: 1
"""
...

@overload
def __getitem__(self, _0: slice[int, int, int], /):
"""
usage.matplotlib: 1
"""
...

Expand Down Expand Up @@ -115,6 +122,7 @@ def __getitem__(
@overload
def __getitem__(self, _0: Tuple[slice[int, int, int], slice[int, int, int]], /):
"""
usage.matplotlib: 1
usage.skimage: 35
"""
...
Expand Down Expand Up @@ -143,6 +151,7 @@ def __getitem__(
@overload
def __getitem__(self, _0: Tuple[slice[None, int, None], slice[None, int, None]], /):
"""
usage.matplotlib: 1
usage.skimage: 2
usage.sklearn: 1
"""
Expand Down Expand Up @@ -306,17 +315,40 @@ def __getitem__(
"""
...

@overload
def __getitem__(self, _0: Tuple[slice[int, float, int], slice[int, float, int]], /):
"""
usage.matplotlib: 3
"""
...

@overload
def __getitem__(self, _0: Tuple[slice[int, int, int], slice[int, int, int]], /):
"""
usage.matplotlib: 2
"""
...

@overload
def __getitem__(
self,
_0: Tuple[
slice[Union[int, float, None], Union[float, int], Union[int, float, None]],
slice[Union[int, float, None], Union[float, int], Union[int, float, None]],
],
/,
self, _0: Tuple[slice[float, float, float], slice[float, float, float]], /
):
"""
usage.matplotlib: 12
usage.matplotlib: 2
"""
...

@overload
def __getitem__(self, _0: Tuple[slice[int, int, int], slice[None, int, None]], /):
"""
usage.matplotlib: 2
"""
...

@overload
def __getitem__(self, _0: Tuple[slice[int, float, int], slice[int, float, int]], /):
"""
usage.matplotlib: 1
"""
...

Expand Down Expand Up @@ -417,7 +449,14 @@ def __getitem__(
@overload
def __getitem__(self, _0: Tuple[slice[int, int, int], slice[int, int, int]], /):
"""
usage.matplotlib: 4
usage.matplotlib: 1
"""
...

@overload
def __getitem__(self, _0: Tuple[slice[int, int, int], slice[int, int, int]], /):
"""
usage.matplotlib: 3
"""
...

Expand Down Expand Up @@ -559,9 +598,16 @@ def __getitem__(
...

@overload
def __getitem__(self, _0: Tuple[numpy.ndarray, ...], /):
def __getitem__(self, _0: Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray], /):
"""
usage.matplotlib: 6
usage.matplotlib: 2
"""
...

@overload
def __getitem__(self, _0: Tuple[numpy.ndarray, numpy.ndarray], /):
"""
usage.matplotlib: 4
"""
...

Expand Down
25 changes: 23 additions & 2 deletions data/typing/numpy.lib.npyio.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,30 @@ def __getitem__(self, _0: Literal["010"], /):
...

@overload
def __getitem__(self, _0: Literal["ymin", "dy", "dx", "elevation"], /):
def __getitem__(self, _0: Literal["elevation"], /):
"""
usage.matplotlib: 4
usage.matplotlib: 1
"""
...

@overload
def __getitem__(self, _0: Literal["dx"], /):
"""
usage.matplotlib: 1
"""
...

@overload
def __getitem__(self, _0: Literal["dy"], /):
"""
usage.matplotlib: 1
"""
...

@overload
def __getitem__(self, _0: Literal["ymin"], /):
"""
usage.matplotlib: 1
"""
...

Expand Down
5 changes: 3 additions & 2 deletions data/typing/numpy.linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def matrix_rank(M: numpy.ndarray, tol: Union[float, numpy.float64] = ...):
@overload
def norm(x: numpy.ndarray):
"""
usage.matplotlib: 3
usage.skimage: 8
"""
...
Expand All @@ -190,9 +191,9 @@ def norm(


@overload
def norm(x: numpy.ndarray, axis: int = ...):
def norm(x: numpy.ndarray, axis: int):
"""
usage.matplotlib: 4
usage.matplotlib: 1
"""
...

Expand Down
Loading