* Added functionality to read pandas dataframe as input matrix and use the index names a filenames.
from clustimage import Clustimage
import pandas as pd
import numpy as np
Initialize
cl = Clustimage()
Import data
Xraw = cl.import_example(data='mnist')
print(Xraw)
array([[ 0., 0., 5., ..., 0., 0., 0.],
[ 0., 0., 0., ..., 10., 0., 0.],
[ 0., 0., 0., ..., 16., 9., 0.],
...,
[ 0., 0., 1., ..., 6., 0., 0.],
[ 0., 0., 2., ..., 12., 0., 0.],
[ 0., 0., 10., ..., 12., 1., 0.]])
filenames = list(map(lambda x: str(x) + '.png', np.arange(0, Xraw.shape[0])))
Xraw = pd.DataFrame(Xraw, index=filenames)
print(Xraw)
0 1 2 3 4 5 ... 58 59 60 61 62 63