0Pricing
Mojo Academy · Lesson

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

  1. Using NumPy from Mojo
  2. Passing Mojo Data to Python
  3. Reading Python Objects Back
  4. Interop Performance Gotchas
← Back to Mojo Academy