summaryrefslogtreecommitdiff
path: root/docs/examples/tutorial/array/safe_usage.py
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/tutorial/array/safe_usage.py')
-rw-r--r--docs/examples/tutorial/array/safe_usage.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/examples/tutorial/array/safe_usage.py b/docs/examples/tutorial/array/safe_usage.py
new file mode 100644
index 000000000..8b9ffd42c
--- /dev/null
+++ b/docs/examples/tutorial/array/safe_usage.py
@@ -0,0 +1,6 @@
+from cython.cimports.cpython import array
+import array
+a = cython.declare(array.array, array.array('i', [1, 2, 3]))
+ca = cython.declare(cython.int[:], a)
+
+print(ca[0])