#NumPy Stacking error ->error: failed to run the pass manager

2 messages · Page 1 of 1 (latest)

ocean cove
#

from python import Python
from time import sleep
from python.object import PythonObject

fn main() raises:

let np =  Python.import_module("numpy")
# Create two numpy arrays


var array1 = np.array([1, 2, 3])
var array2 = np.array([10, 20, 30])


var stacked_array  = np.c_[array1, array2]
#let stacked_array = np.column_stack((array1, array2))

print(stacked_array)
stray bay
#

Did you import numpy as a Python module in your project ? Did you have set MOJO_PYTHON_LIBRARY ?