#!python

import os
import sys
from glob import glob
import numpy as np


if __name__ == '__main__':
    args = sys.argv[1:]
    for arg in args:
        if arg.endswith('.npy') and os.path.isfile(arg):
            res = np.load(arg, 'r')
            print(res.shape, res.dtype, arg)
        elif os.path.isdir(arg):
            fns = sorted(glob(os.path.join(arg, '*.npy')))
            for fn in fns:
                res = np.load(fn, 'r')
                print(res.shape, res.dtype, fn)
