diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-04-23 13:57:10 +0200 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-04-23 13:57:10 +0200 |
commit | 02555acfa39aad2802e98b5cd440d111279c5648 (patch) | |
tree | 4bc535dab65b5f16ffa2d987955dc39d05c0111a | |
parent | a4ae295828c73480882a0385822a20a296393a30 (diff) | |
download | numpy-02555acfa39aad2802e98b5cd440d111279c5648.tar.gz |
ENH: Add improved placeholder annotations for `np.char`
-rw-r--r-- | numpy/__init__.pyi | 42 | ||||
-rw-r--r-- | numpy/char.pyi | 107 |
2 files changed, 96 insertions, 53 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index b9909b2f0..4b93ce0f3 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -408,7 +408,47 @@ class chararray(ndarray[_ShapeType, _DType_co]): strides: Any = ..., order: Any = ..., ) -> Any: ... - def __getattr__(self, key: str) -> Any: ... + def __array_finalize__(self, obj): ... + def argsort(self, axis=..., kind=..., order=...): ... + def capitalize(self): ... + def center(self, width, fillchar=...): ... + def count(self, sub, start=..., end=...): ... + def decode(self, encoding=..., errors=...): ... + def encode(self, encoding=..., errors=...): ... + def endswith(self, suffix, start=..., end=...): ... + def expandtabs(self, tabsize=...): ... + def find(self, sub, start=..., end=...): ... + def index(self, sub, start=..., end=...): ... + def isalnum(self): ... + def isalpha(self): ... + def isdigit(self): ... + def islower(self): ... + def isspace(self): ... + def istitle(self): ... + def isupper(self): ... + def join(self, seq): ... + def ljust(self, width, fillchar=...): ... + def lower(self): ... + def lstrip(self, chars=...): ... + def partition(self, sep): ... + def replace(self, old, new, count=...): ... + def rfind(self, sub, start=..., end=...): ... + def rindex(self, sub, start=..., end=...): ... + def rjust(self, width, fillchar=...): ... + def rpartition(self, sep): ... + def rsplit(self, sep=..., maxsplit=...): ... + def rstrip(self, chars=...): ... + def split(self, sep=..., maxsplit=...): ... + def splitlines(self, keepends=...): ... + def startswith(self, prefix, start=..., end=...): ... + def strip(self, chars=...): ... + def swapcase(self): ... + def title(self): ... + def translate(self, table, deletechars=...): ... + def upper(self): ... + def zfill(self, width): ... + def isnumeric(self): ... + def isdecimal(self): ... class finfo: def __new__(cls, dtype: Any) -> Any: ... diff --git a/numpy/char.pyi b/numpy/char.pyi index 0e3596bb2..4904aa27a 100644 --- a/numpy/char.pyi +++ b/numpy/char.pyi @@ -1,56 +1,59 @@ from typing import Any, List +from numpy import ( + chararray as chararray, +) + __all__: List[str] -equal: Any -not_equal: Any -greater_equal: Any -less_equal: Any -greater: Any -less: Any -str_len: Any -add: Any -multiply: Any -mod: Any -capitalize: Any -center: Any -count: Any -decode: Any -encode: Any -endswith: Any -expandtabs: Any -find: Any -index: Any -isalnum: Any -isalpha: Any -isdigit: Any -islower: Any -isspace: Any -istitle: Any -isupper: Any -join: Any -ljust: Any -lower: Any -lstrip: Any -partition: Any -replace: Any -rfind: Any -rindex: Any -rjust: Any -rpartition: Any -rsplit: Any -rstrip: Any -split: Any -splitlines: Any -startswith: Any -strip: Any -swapcase: Any -title: Any -translate: Any -upper: Any -zfill: Any -isnumeric: Any -isdecimal: Any -array: Any -asarray: Any -chararray: Any +def equal(x1, x2): ... +def not_equal(x1, x2): ... +def greater_equal(x1, x2): ... +def less_equal(x1, x2): ... +def greater(x1, x2): ... +def less(x1, x2): ... +def str_len(a): ... +def add(x1, x2): ... +def multiply(a, i): ... +def mod(a, values): ... +def capitalize(a): ... +def center(a, width, fillchar=...): ... +def count(a, sub, start=..., end=...): ... +def decode(a, encoding=..., errors=...): ... +def encode(a, encoding=..., errors=...): ... +def endswith(a, suffix, start=..., end=...): ... +def expandtabs(a, tabsize=...): ... +def find(a, sub, start=..., end=...): ... +def index(a, sub, start=..., end=...): ... +def isalnum(a): ... +def isalpha(a): ... +def isdigit(a): ... +def islower(a): ... +def isspace(a): ... +def istitle(a): ... +def isupper(a): ... +def join(sep, seq): ... +def ljust(a, width, fillchar=...): ... +def lower(a): ... +def lstrip(a, chars=...): ... +def partition(a, sep): ... +def replace(a, old, new, count=...): ... +def rfind(a, sub, start=..., end=...): ... +def rindex(a, sub, start=..., end=...): ... +def rjust(a, width, fillchar=...): ... +def rpartition(a, sep): ... +def rsplit(a, sep=..., maxsplit=...): ... +def rstrip(a, chars=...): ... +def split(a, sep=..., maxsplit=...): ... +def splitlines(a, keepends=...): ... +def startswith(a, prefix, start=..., end=...): ... +def strip(a, chars=...): ... +def swapcase(a): ... +def title(a): ... +def translate(a, table, deletechars=...): ... +def upper(a): ... +def zfill(a, width): ... +def isnumeric(a): ... +def isdecimal(a): ... +def array(obj, itemsize=..., copy=..., unicode=..., order=...): ... +def asarray(obj, itemsize=..., unicode=..., order=...): ... |