A
A
Asya2021-09-09 11:43:36
Python
Asya, 2021-09-09 11:43:36

How to merge arrays into one?

I have 200000 arrays where each dimension is (1000, 1000, 3) and they are all stored in a directory
. How can I best combine them into one big array?

when I do this:

numpy_ars = []
for np_name in glob.glob('*.np[yz]'):
    numpy_ars.append(np.load(np_name))
print(np.array(numpy_ars).shape)


then at some point I get sigkill

How to make all arrays eventually loaded into one (200000, 1000, 1000, 3) ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question