Sharif Abu Darda
Sharif Abu Darda

Reputation: 503

Convert an array of variable and give it a numpy array structure

I have an array of data in a variable flux1 and when I type

print(flux1) 

in python console I got a data array as

[2.93066965e-06 3.09537578e-06 2.80267259e-06 ... 3.14786615e-06 2.42937392e-06 2.47956683e-06]

there is 40 000 values in there.

I want to structure this flux1 as in np.random.random((200, 200)) generated array.

Upvotes: 0

Views: 28

Answers (1)

Sharif Abu Darda
Sharif Abu Darda

Reputation: 503

I solved it, All I had to do was:

np.reshape(flux1, (200, 200))

Upvotes: 1

Related Questions