I want to create a n-dimentional numpy array. Following is my code
import numpy as np
random_weights = np.empty(3)
random_weights[0] = np.array([0,1,2])
random_weights[1] = np.array([3,4,5])
Above code gives me ValueError: setting an array element with a sequence. error. I am trying to create multi-dimentional array. What is the reason for this issue?
random_weights = np.array([[0,1,2], [3,4,5]])?