summaryrefslogtreecommitdiff
path: root/cuda/nix-python-devenv/hello.py
diff options
context:
space:
mode:
Diffstat (limited to 'cuda/nix-python-devenv/hello.py')
-rw-r--r--cuda/nix-python-devenv/hello.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/cuda/nix-python-devenv/hello.py b/cuda/nix-python-devenv/hello.py
new file mode 100644
index 0000000..9f27d8a
--- /dev/null
+++ b/cuda/nix-python-devenv/hello.py
@@ -0,0 +1,12 @@
+import numpy as np
+
+
+def main():
+ print("Hello from nix-python-devenv!")
+ print("As you can see, C bindings are correct, because numpy works:")
+ print("a =", a := np.array([1, 2, 3]))
+ print("mean(a) =", a.mean())
+
+
+if __name__ == "__main__":
+ main()