3

This is going to be a rather silly question, though it is annoying. I have a list of 800 ndarrays which have 7680 elements each. How do I get this to a <800,7680> format ?

enter image description here

0

1 Answer 1

4

Just pass it to the np.array factory function. As an example:

>>> lst = [np.zeros(7680) for x in range(800)]  #just a list of 800 ndarrays ...
>>> arr = np.array(lst)   #make them into an array
>>> arr.shape   #shape looks OK to me :-)
(800, 7680)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.