How do I access the dictionary inside the array?
import numpy as np
x = np.array({'x': 2, 'y': 5})
My initial thought:
x['y']
Index Error: not a valid index
x[0]
Index Error: too many indices for array
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…