on-internet
← Community

Structured array from individual field arrays (python, numpy)

Stack Overflow ·

I would like to make an structured array data like dtype_test = [ ('a', np.int16), ('b', np.int16), ] data = np.array( [(1, 2), (3, 4), (5, 6)], dtype=dtype_test) However, I only have individual fields array; (1,3,5) and (2,4,6). In other words, I have data data['a'] and data['b'] already made. How can I directly make data from these individual arrays?

Comments

Sign in or sign up to comment and upvote.

No comments yet.