Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
139 views
in Technique[技术] by (71.8m points)

python - How to add elements to numpy ndarray


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

What about numpy.vstack?

A = np.array([[1.11926603, 0.66536009, 0.63453309],
    [0.57149771, 0.43967367, 0.30005988]])
B = np.array([x.xxxxx, y.yyyyy, z.zzzzz])
A = np.vstack((A, B))

...gives the wanted result.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...