We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb0f024 commit d95abdfCopy full SHA for d95abdf
1 file changed
array_api_tests/_array_module.py
@@ -0,0 +1,22 @@
1
+import os
2
+from importlib import import_module
3
+
4
+# Replace this with a specific array module to test it, for example,
5
+#
6
+# import numpy as array_module
7
+array_module = None
8
9
+if array_module is None:
10
+ if 'ARRAY_API_TESTS_MODULE' in os.environ:
11
+ mod_name = os.environ['ARRAY_API_TESTS_MODULE']
12
+ mod = import_module(mod_name)
13
+ else:
14
+ raise RuntimeError("No array module specified. Either edit _array_module.py or set the ARRAY_API_TESTS_MODULE environment variable")
15
+else:
16
+ mod = array_module
17
18
+# Names from the spec. This is what should actually be imported from this
19
+# file.
20
21
+array = mod.array
22
+dtype = mod.dtype
0 commit comments