import glob
import numpy as np

X = np.empty((0, 193))
y = np.empty((0, 10))
groups = np.empty((0, 1))
npz_files = glob.glob('./urban_sound_?.npz')
for fn in npz_files:
    print(fn)
    data = np.load(fn)
    X = np.append(X, data['X'], axis=0)
    y = np.append(y, data['y'], axis=0)
    groups = np.append(groups, data['groups'], axis=0)

print(groups[groups>0])

print(X.shape, y.shape)
for r in y:
    if np.sum(r) > 1.5:
        print(r)
np.savez('urban_sound', X=X, y=y, groups=groups)

[(4, 'numpy.empty', 'np.empty', True, 'import numpy as np\n'), (5, 'numpy.empty', 'np.empty', True, 'import numpy as np\n'), (6, 'numpy.empty', 'np.empty', True, 'import numpy as np\n'), (7, 'glob.glob', 'glob.glob', False, 'import glob\n'), (21, 'numpy.savez', 'np.savez', True, 'import numpy as np\n'), (10, 'numpy.load', 'np.load', True, 'import numpy as np\n'), (11, 'numpy.append', 'np.append', True, 'import numpy as np\n'), (12, 'numpy.append', 'np.append', True, 'import numpy as np\n'), (13, 'numpy.append', 'np.append', True, 'import numpy as np\n'), (19, 'numpy.sum', 'np.sum', True, 'import numpy as np\n')]