The following code does not have any problem in Python 2.7, however in Python 3.4.3, throws TypeError: iteration over a 0-d array
import numpy as np
def c1():
mat=[]
mat.append(np.array(map(float,np.random.rand(7))))
return mat
mylist=[]
mydict_={}
mydict_['dog']=c1()
mydict_['big']=c1()
justKeys={label:1 for label in list(mydict_.keys())}
for idx, word in enumerate(justKeys.keys()):
mylist.append(np.array(map(float, mydict_[word][0])))
What should I do in order to the list mylist in both python2.7 and 3.4 get the same results?