Using NumPy from Mojo
Call NumPy arrays and functions.
NumPy, From Mojo
NumPy powers most Python number-crunching, and Mojo lets you call it directly, so you keep that ecosystem while writing fast code. 🔢
Import It First
Bring NumPy in the same way you import any Python module: call Python.import_module with the name "numpy".
var np = Python.import_module("numpy")All lessons in this course
- Using NumPy from Mojo
- Passing Mojo Data to Python
- Reading Python Objects Back
- Interop Performance Gotchas