0

I have a numpy array that consists of more then 2000 arrays inside and looks like this:

array([[0.0000000e+00, 0.0000000e+00, 1.9679647e+14, ..., 1.6781340e+13,
    1.0186320e+13, 4.1649500e+12],
   [0.0000000e+00, 0.0000000e+00, 1.4426557e+14, ..., 1.2301900e+13,
    7.4672900e+12, 3.0532000e+12],
   [0.0000000e+00, 0.0000000e+00, 1.4426557e+14, ..., 1.2301900e+13,
    7.4672900e+12, 3.0532000e+12],
   ...,
   [0.0000000e+00, 0.0000000e+00, 1.4426557e+14, ..., 1.2301900e+13,
    7.4672900e+12, 3.0532000e+12],
   [0.0000000e+00, 0.0000000e+00, 1.4426557e+14, ..., 1.2301900e+13,
    7.4672900e+12, 3.0532000e+12],
   [0.0000000e+00, 0.0000000e+00, 3.9105554e+14, ..., 3.3346310e+13,
    2.0241300e+13, 8.2762000e+12]])

I need to concatenate these arrays into one big array so I will have one array only without array of arrays and look like this:

[ 0.0000000e+00, 0.0000000e+00, 1.9679647e+14, ..., 1.6781340e+13,1.0186320e+13, 4.1649500e+12, 0.0000000e+00, 0.0000000e+00, 1.4426557e+14, ..., 1.2301900e+13,7.4672900e+12, 3.0532000e+12, ...,0.0000000e+00, 0.0000000e+00, 3.9105554e+14, ..., 3.3346310e+13,
    2.0241300e+13, 8.2762000e+12]

Is it any way to do this?

doppelherz7
  • 11
  • 1
  • 3

1 Answers1

0
flat_array = messy_numpy_array.flatten()