diff options
| author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-07-08 12:39:29 +0200 |
|---|---|---|
| committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-07-08 12:39:29 +0200 |
| commit | 9c1bfcc7159aa41798530cc616e5de46f365e167 (patch) | |
| tree | e9d7e1afa518ee1069768a071addebcc07d96571 | |
| parent | 2be00ef6377996935a2fb18aa2733a53080aa3aa (diff) | |
| download | numpy-9c1bfcc7159aa41798530cc616e5de46f365e167.tar.gz | |
MAINT: Move the `flagsobj` annotations to `np.core.multiarray`
| -rw-r--r-- | numpy/__init__.pyi | 33 | ||||
| -rw-r--r-- | numpy/core/multiarray.pyi | 30 |
2 files changed, 32 insertions, 31 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index 0eda5d2ac..14cecd6c0 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -8,6 +8,7 @@ from abc import abstractmethod from types import TracebackType, MappingProxyType from contextlib import ContextDecorator +from numpy.core.multiarray import flagsobj from numpy.core._internal import _ctypes from numpy.typing import ( # Arrays @@ -1121,36 +1122,6 @@ class dtype(Generic[_DTypeScalar_co]): @property def type(self) -> Type[_DTypeScalar_co]: ... -class _flagsobj: - aligned: bool - updateifcopy: bool - writeable: bool - writebackifcopy: bool - @property - def behaved(self) -> bool: ... - @property - def c_contiguous(self) -> bool: ... - @property - def carray(self) -> bool: ... - @property - def contiguous(self) -> bool: ... - @property - def f_contiguous(self) -> bool: ... - @property - def farray(self) -> bool: ... - @property - def fnc(self) -> bool: ... - @property - def forc(self) -> bool: ... - @property - def fortran(self) -> bool: ... - @property - def num(self) -> int: ... - @property - def owndata(self) -> bool: ... - def __getitem__(self, key: str) -> bool: ... - def __setitem__(self, key: str, value: bool) -> None: ... - _ArrayLikeInt = Union[ int, integer, @@ -1203,7 +1174,7 @@ class _ArrayOrScalarCommon: @property def data(self) -> memoryview: ... @property - def flags(self) -> _flagsobj: ... + def flags(self) -> flagsobj: ... @property def itemsize(self) -> int: ... @property diff --git a/numpy/core/multiarray.pyi b/numpy/core/multiarray.pyi index bc33165be..072a15eb6 100644 --- a/numpy/core/multiarray.pyi +++ b/numpy/core/multiarray.pyi @@ -948,3 +948,33 @@ def compare_chararrays( ) -> NDArray[bool_]: ... def add_docstring(__obj: Callable[..., Any], __docstring: str) -> None: ... + +class flagsobj: + aligned: bool + updateifcopy: bool + writeable: bool + writebackifcopy: bool + @property + def behaved(self) -> bool: ... + @property + def c_contiguous(self) -> bool: ... + @property + def carray(self) -> bool: ... + @property + def contiguous(self) -> bool: ... + @property + def f_contiguous(self) -> bool: ... + @property + def farray(self) -> bool: ... + @property + def fnc(self) -> bool: ... + @property + def forc(self) -> bool: ... + @property + def fortran(self) -> bool: ... + @property + def num(self) -> int: ... + @property + def owndata(self) -> bool: ... + def __getitem__(self, key: str) -> bool: ... + def __setitem__(self, key: str, value: bool) -> None: ... |
