How to load 2d array

Hi, I am new here.

I have two folders. A and B
In A flole, the file structure like following:

  1. txt
    2.txt
    3.txt

    each txt file is a 2d array.

In B folder, the file structure like:

  1. txt
    2.txt
    3.txt

    each file is a score (single number) for A folder’ array.

A folder is too large to load in memory.
Do you know how to load this dataset?

Thanks

Are A and B paired data?

They are paired. I solved this problem.

Thanks