Lists into Array (Python)

Solution 1:

import numpy as np

list_1 = [0.01665703, 0.06662812, 0.01665703]
list_2 = [0.00049017, 0.00012254, 0.00110289]
list_3 = [0.00012333, 0.00110994, 0.00012333]
combined = np.array([
    list_1,
    list_2,
    list_3
])

Solution 2:

Is this what you want? This gives you the ideal output you specified. probably not the best way to do it, but it works


import numpy as np

myList_1 = [0.01665703, 0.06662812, 0.01665703]
myList_2 = [0.00049017, 0.00012254, 0.00110289]
myList_3 = [0.00012333, 0.00110994, 0.00012333]




print(np.array([myList_1, myList_2, myList_3]))