import numpy as np
nparray = np.zeros((5,5))
L1 = list()
L2 = []
L3 = [3,4,1,6,7,5]
L4 = [[2, 9, -5], [-1, 0, 4], [3, 1, 2]]
print(L3[0])
a = np.asarray(L4)
print(a)
for (x,y), value in np.ndenumerate(a):
print(x,y)
Output is
3
[[ 2 9 -5]
[-1 0 4]
[ 3 1 2]]
0 0
0 1
0 2
1 0
1 1
1 2
2 0
2 1
2 2
I have no idea where 0 0/0 1/02...2/2 is coming from
My assignment is to find the mean of all the #'s in L4. I am having trouble iterating the list.
The only hint that was given is "Simplest solution makes use of NumPy"