text_plain_output_1.png
from tqdm import tqdm

import json

import numpy as np # linear algebra

import os

train_path = '/kaggle/input/abstraction-and-reasoning-challenge/training/'
evaluation_path = '/kaggle/input/abstraction-and-reasoning-challenge/evaluation/'
test_path = '/kaggle/input/abstraction-and-reasoning-challenge/test/'

same_shape = []
for ex in tqdm(os.listdir(evaluation_path)):
    with open(evaluation_path + ex, 'r') as train_file:
        all_im = json.load(train_file)
        im_in = np.array(all_im['train'][0]['input'])
        im_out = np.array(all_im['train'][0]['output'])
        if im_in.shape == im_out.shape:
            same_shape.append(ex)
print('Same:', len(same_shape), 'All:', len(os.listdir(evaluation_path)))