summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/_internal.pyi18
-rw-r--r--numpy/core/setup.py1
2 files changed, 19 insertions, 0 deletions
diff --git a/numpy/core/_internal.pyi b/numpy/core/_internal.pyi
new file mode 100644
index 000000000..1b3889e51
--- /dev/null
+++ b/numpy/core/_internal.pyi
@@ -0,0 +1,18 @@
+from typing import Any
+
+# TODO: add better annotations when ctypes is stubbed out
+
+class _ctypes:
+ @property
+ def data(self) -> int: ...
+ @property
+ def shape(self) -> Any: ...
+ @property
+ def strides(self) -> Any: ...
+ def data_as(self, obj: Any) -> Any: ...
+ def shape_as(self, obj: Any) -> Any: ...
+ def strides_as(self, obj: Any) -> Any: ...
+ def get_data(self) -> int: ...
+ def get_shape(self) -> Any: ...
+ def get_strides(self) -> Any: ...
+ def get_as_parameter(self) -> Any: ...
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 16bac4272..5351b30bf 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -967,6 +967,7 @@ def configuration(parent_package='',top_path=None):
config.add_subpackage('tests')
config.add_data_dir('tests/data')
config.add_data_dir('tests/examples')
+ config.add_data_files('*.pyi')
config.make_svn_version_py()