tests/inputs/issues/405/globs.py
raw| 1 | import glob |
| 2 | import numpy as np |
| 3 | |
| 4 | def print_info(path) |
| 5 | ''' |
| 6 | print stuff |
| 7 | ''' |
| 8 | files = sorted(glob.glob('%s/*.*' % path)) |
| 9 | for i, file in enumerate(files): |
| 10 | labels = np.loadtxt(file, dtype=np.float32).reshape(-1, 5) |
| 11 | x += np.bincount(labels[:, 0].astype('int32'), minlength=nc) |
| 12 | print(i, len(files)) |
| 13 | |
| 14 | ''' |
| 15 | end stuff |
| 16 | ''' |