def load_MNIST_labels(filename):
    with open(filename, 'r') as f:
        magic = np.fromfile(f, dtype=np.dtype('>i4'), count=1)

        num_labels = np.fromfile(f, dtype=np.dtype('>i4'), count=1)

        labels = np.fromfile(f, dtype=np.ubyte)

        f.close()

        return labels
returns a [number of MNIST images]x1 matrix containing
dataset/ETHPy150Open jatinshah/ufldl_tutorial/load_MNIST.py/load_MNIST_labels