Skip to content

Commit ff1af1d

Browse files
[Bot] Combine APIs and create typings
1 parent 0d48c7a commit ff1af1d

13 files changed

Lines changed: 1496 additions & 187 deletions

data/api.json

Lines changed: 1084 additions & 150 deletions
Large diffs are not rendered by default.

data/typing/numpy.py

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@
15151515
pdtrik: numpy.ufunc
15161516

15171517
# usage.geopandas: 2
1518+
# usage.hvplot: 1
15181519
# usage.matplotlib: 129
15191520
# usage.networkx: 2
15201521
# usage.pandas: 3
@@ -1685,6 +1686,7 @@
16851686
signedinteger: object
16861687

16871688
# usage.dask: 58
1689+
# usage.hvplot: 1
16881690
# usage.koalas: 5
16891691
# usage.matplotlib: 127
16901692
# usage.networkx: 5
@@ -1732,6 +1734,7 @@
17321734

17331735
# usage.dask: 68
17341736
# usage.geopandas: 4
1737+
# usage.hvplot: 3
17351738
# usage.koalas: 11
17361739
# usage.matplotlib: 40
17371740
# usage.networkx: 19
@@ -7858,6 +7861,7 @@ def array(_0: List[int], /):
78587861
"""
78597862
usage.dask: 142
78607863
usage.geopandas: 9
7864+
usage.hvplot: 1
78617865
usage.koalas: 6
78627866
usage.matplotlib: 41
78637867
usage.modin: 1
@@ -23284,6 +23288,7 @@ def array(
2328423288
"""
2328523289
usage.dask: 529
2328623290
usage.geopandas: 158
23291+
usage.hvplot: 1
2328723292
usage.koalas: 36
2328823293
usage.matplotlib: 812
2328923294
usage.modin: 47
@@ -58846,6 +58851,7 @@ def linspace(start: numpy.float64, stop: numpy.float64, num: int, endpoint: bool
5884658851
@overload
5884758852
def linspace(start: int, stop: float, num: int):
5884858853
"""
58854+
usage.hvplot: 1
5884958855
usage.matplotlib: 17
5885058856
usage.scipy: 64
5885158857
usage.seaborn: 2
@@ -59276,6 +59282,7 @@ def linspace(
5927659282
):
5927759283
"""
5927859284
usage.dask: 26
59285+
usage.hvplot: 1
5927959286
usage.koalas: 10
5928059287
usage.matplotlib: 184
5928159288
usage.networkx: 7
@@ -62823,10 +62830,22 @@ def nanquantile(
6282362830
...
6282462831

6282562832

62833+
@overload
62834+
def nanquantile(a: pandas.core.series.Series, q: float):
62835+
"""
62836+
usage.hvplot: 2
62837+
"""
62838+
...
62839+
62840+
6282662841
def nanquantile(
62827-
a: object, q: numpy.ndarray, axis: numpy.ndarray, interpolation: Literal["linear"]
62842+
a: object,
62843+
q: Union[float, numpy.ndarray],
62844+
axis: numpy.ndarray = ...,
62845+
interpolation: Literal["linear"] = ...,
6282862846
):
6282962847
"""
62848+
usage.hvplot: 2
6283062849
usage.xarray: 4
6283162850
"""
6283262851
...
@@ -84885,6 +84904,7 @@ def __bool__(self, /):
8488584904
"""
8488684905
usage.dask: 12
8488784906
usage.geopandas: 2
84907+
usage.hvplot: 2
8488884908
usage.matplotlib: 14
8488984909
usage.networkx: 3
8489084910
usage.pandas: 66
@@ -85617,6 +85637,7 @@ def __xor__(
8561785637
def all(self, /):
8561885638
"""
8561985639
usage.dask: 1
85640+
usage.hvplot: 1
8562085641
usage.pandas: 4
8562185642
usage.scipy: 3
8562285643
usage.sklearn: 1
@@ -88042,6 +88063,7 @@ class dtype:
8804288063
itemsize: object
8804388064

8804488065
# usage.dask: 75
88066+
# usage.hvplot: 3
8804588067
# usage.matplotlib: 42
8804688068
# usage.networkx: 11
8804788069
# usage.pandas: 643
@@ -92656,6 +92678,7 @@ def __gt__(self, _0: numpy.float64, /):
9265692678
def __gt__(self, _0: int, /):
9265792679
"""
9265892680
usage.dask: 6
92681+
usage.hvplot: 1
9265992682
usage.matplotlib: 33
9266092683
usage.networkx: 5
9266192684
usage.prophet: 4
@@ -92759,6 +92782,7 @@ def __gt__(self, _0: numpy.uint64, /):
9275992782
def __gt__(self, _0: object, /):
9276092783
"""
9276192784
usage.dask: 28
92785+
usage.hvplot: 1
9276292786
usage.matplotlib: 174
9276392787
usage.networkx: 13
9276492788
usage.pandas: 15
@@ -93207,6 +93231,7 @@ def __lt__(self, _0: float, /):
9320793231
def __lt__(self, _0: int, /):
9320893232
"""
9320993233
usage.dask: 4
93234+
usage.hvplot: 1
9321093235
usage.matplotlib: 45
9321193236
usage.networkx: 2
9321293237
usage.prophet: 1
@@ -93347,6 +93372,7 @@ def __lt__(self, _0: pandas.core.series.Series, /):
9334793372
def __lt__(self, _0: object, /):
9334893373
"""
9334993374
usage.dask: 23
93375+
usage.hvplot: 1
9335093376
usage.matplotlib: 213
9335193377
usage.networkx: 15
9335293378
usage.pandas: 5
@@ -107470,6 +107496,7 @@ def __contains__(self, _0: object, /):
107470107496
def __eq__(self, _0: numpy.ndarray, /):
107471107497
"""
107472107498
usage.dask: 136
107499+
usage.hvplot: 2
107473107500
usage.matplotlib: 46
107474107501
usage.networkx: 4
107475107502
usage.sample-usage: 2
@@ -108137,6 +108164,7 @@ def __eq__(self, _0: object, /):
108137108164
"""
108138108165
usage.dask: 194
108139108166
usage.geopandas: 11
108167+
usage.hvplot: 2
108140108168
usage.matplotlib: 88
108141108169
usage.modin: 1
108142108170
usage.networkx: 8
@@ -108357,6 +108385,7 @@ def __getitem__(self, _0: slice[None, int, None], /):
108357108385
"""
108358108386
usage.dask: 35
108359108387
usage.geopandas: 1
108388+
usage.hvplot: 1
108360108389
usage.koalas: 2
108361108390
usage.matplotlib: 53
108362108391
usage.modin: 3
@@ -108414,6 +108443,7 @@ def __getitem__(self, _0: slice[int, None, int], /):
108414108443
"""
108415108444
usage.dask: 19
108416108445
usage.geopandas: 1
108446+
usage.hvplot: 1
108417108447
usage.matplotlib: 45
108418108448
usage.modin: 1
108419108449
usage.networkx: 6
@@ -116175,6 +116205,7 @@ def __getitem__(self, _0: object, /):
116175116205
"""
116176116206
usage.dask: 679
116177116207
usage.geopandas: 60
116208+
usage.hvplot: 2
116178116209
usage.koalas: 22
116179116210
usage.matplotlib: 1402
116180116211
usage.modin: 26
@@ -117189,6 +117220,7 @@ def __iter__(self, /):
117189117220
"""
117190117221
usage.dask: 6
117191117222
usage.geopandas: 27
117223+
usage.hvplot: 1
117192117224
usage.koalas: 4
117193117225
usage.matplotlib: 363
117194117226
usage.modin: 14
@@ -132754,6 +132786,7 @@ def cumprod(self, /, *, axis: int = ...):
132754132786
def cumsum(self, /):
132755132787
"""
132756132788
usage.dask: 3
132789+
usage.hvplot: 1
132757132790
usage.matplotlib: 2
132758132791
usage.modin: 2
132759132792
usage.scipy: 6
@@ -132801,6 +132834,7 @@ def cumsum(
132801132834
):
132802132835
"""
132803132836
usage.dask: 7
132837+
usage.hvplot: 1
132804132838
usage.matplotlib: 3
132805132839
usage.modin: 2
132806132840
usage.pandas: 6
@@ -137424,6 +137458,7 @@ def __call__(self, _0: pandas.core.series.Series, /):
137424137458
"""
137425137459
usage.dask: 295
137426137460
usage.geopandas: 2
137461+
usage.hvplot: 1
137427137462
usage.koalas: 39
137428137463
usage.prophet: 7
137429137464
usage.seaborn: 2
@@ -137436,6 +137471,7 @@ def __call__(self, _0: numpy.ndarray, /):
137436137471
"""
137437137472
usage.dask: 461
137438137473
usage.geopandas: 9
137474+
usage.hvplot: 1
137439137475
usage.koalas: 1
137440137476
usage.matplotlib: 317
137441137477
usage.networkx: 25
@@ -137596,6 +137632,7 @@ def __call__(self, _0: int, /):
137596137632
"""
137597137633
usage.dask: 20
137598137634
usage.geopandas: 4
137635+
usage.hvplot: 1
137599137636
usage.matplotlib: 58
137600137637
usage.networkx: 8
137601137638
usage.scipy: 585
@@ -140462,6 +140499,13 @@ def __call__(self, _0: numpy.ndarray, _1: numpy.int64, /):
140462140499
"""
140463140500
...
140464140501

140502+
@overload
140503+
def __call__(self, _0: holoviews.util.transform.dim, /):
140504+
"""
140505+
usage.hvplot: 1
140506+
"""
140507+
...
140508+
140465140509
@overload
140466140510
def __call__(self, _0: numpy.ndarray, _1: pandas.core.series.Series, /):
140467140511
"""
@@ -141056,6 +141100,7 @@ def __call__(
141056141100
"""
141057141101
usage.dask: 4506
141058141102
usage.geopandas: 23
141103+
usage.hvplot: 4
141059141104
usage.koalas: 459
141060141105
usage.matplotlib: 781
141061141106
usage.modin: 1
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
from typing import *
22

33

4+
class DictWrapper:
5+
6+
# usage.hvplot: 2
7+
backend: Literal["hvplot", "holoviews"]
8+
9+
# usage.hvplot: 2
10+
plotting: object
11+
12+
413
class option_context:
514
pass

data/typing/pandas.core.dtypes.common.py

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,26 +451,58 @@ def is_categorical_dtype(arr_or_dtype: object):
451451

452452

453453
@overload
454-
def is_datetime64_any_dtype(arr_or_dtype: numpy.dtype):
454+
def is_datetime64_any_dtype(arr_or_dtype: pandas.core.series.Series):
455455
"""
456-
usage.dask: 3
456+
usage.dask: 1
457+
usage.hvplot: 2
457458
"""
458459
...
459460

460461

461462
@overload
462-
def is_datetime64_any_dtype(arr_or_dtype: pandas.core.series.Series):
463+
def is_datetime64_any_dtype(arr_or_dtype: pandas.core.indexes.range.RangeIndex):
463464
"""
464-
usage.dask: 1
465+
usage.hvplot: 1
466+
"""
467+
...
468+
469+
470+
@overload
471+
def is_datetime64_any_dtype(arr_or_dtype: pandas.core.indexes.datetimes.DatetimeIndex):
472+
"""
473+
usage.hvplot: 3
474+
"""
475+
...
476+
477+
478+
@overload
479+
def is_datetime64_any_dtype(arr_or_dtype: pandas.core.indexes.numeric.Int64Index):
480+
"""
481+
usage.hvplot: 1
482+
"""
483+
...
484+
485+
486+
@overload
487+
def is_datetime64_any_dtype(arr_or_dtype: numpy.dtype):
488+
"""
489+
usage.dask: 3
465490
"""
466491
...
467492

468493

469494
def is_datetime64_any_dtype(
470-
arr_or_dtype: Union[pandas.core.series.Series, numpy.dtype]
495+
arr_or_dtype: Union[
496+
numpy.dtype,
497+
pandas.core.series.Series,
498+
pandas.core.indexes.datetimes.DatetimeIndex,
499+
pandas.core.indexes.range.RangeIndex,
500+
pandas.core.indexes.numeric.Int64Index,
501+
]
471502
):
472503
"""
473504
usage.dask: 4
505+
usage.hvplot: 7
474506
"""
475507
...
476508

@@ -795,6 +827,7 @@ def is_numeric_dtype(arr_or_dtype: numpy.ndarray):
795827
def is_numeric_dtype(arr_or_dtype: pandas.core.series.Series):
796828
"""
797829
usage.dask: 1
830+
usage.hvplot: 1
798831
usage.seaborn: 1
799832
"""
800833
...
@@ -883,6 +916,7 @@ def is_numeric_dtype(arr_or_dtype: List[Union[Literal["d", "a", "b", "c"], float
883916
def is_numeric_dtype(arr_or_dtype: object):
884917
"""
885918
usage.dask: 1
919+
usage.hvplot: 1
886920
usage.koalas: 1
887921
usage.seaborn: 18
888922
usage.statsmodels: 9

0 commit comments

Comments
 (0)