aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py')
-rw-r--r--.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py b/.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py
new file mode 100644
index 00000000..388dd917
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/numpy/_utils/__init__.py
@@ -0,0 +1,29 @@
+"""
+This is a module for defining private helpers which do not depend on the
+rest of NumPy.
+
+Everything in here must be self-contained so that it can be
+imported anywhere else without creating circular imports.
+If a utility requires the import of NumPy, it probably belongs
+in ``numpy.core``.
+"""
+
+from ._convertions import asunicode, asbytes
+
+
+def set_module(module):
+ """Private decorator for overriding __module__ on a function or class.
+
+ Example usage::
+
+ @set_module('numpy')
+ def example():
+ pass
+
+ assert example.__module__ == 'numpy'
+ """
+ def decorator(func):
+ if module is not None:
+ func.__module__ = module
+ return func
+ return decorator