def test_all_sparse_utlc():
    skip_if_no_data()
    for name in ['harry', 'terry', 'ule']:
        print("Loading sparse ", name)
        train, valid, test = utlc.load_sparse_dataset(name, normalize=True)
        nb_elem = numpy.prod(train.shape)
        mi = train.data.min()
        ma = train.data.max()
        mi = min(0, mi)
        ma = max(0, ma)
        su = train.data.sum()
        mean = float(su) / nb_elem
        print(name, "dtype, max, min, mean, nb non-zero, nb element, %sparse")
        print(train.dtype, ma, mi, mean, train.nnz, end='')
        print(nb_elem, (nb_elem - float(train.nnz)) / nb_elem)
        print(name, "max, min, mean, std (all stats on non-zero element)")
        print(train.data.max(), train.data.min(), end='')
        print(train.data.mean(), train.data.std())
        assert scipy.sparse.issparse(train)
        assert scipy.sparse.issparse(valid)
        assert scipy.sparse.issparse(test)
        assert train.shape[1] == test.shape[1] == valid.shape[1]
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/tests/test_utlc.py/test_all_sparse_utlc/original