def test_iterator():
 x = csr_matrix([[1, 2, 0], [0, 0, 3], [4, 0, 5]])
 ds = SparseDataset(from_scipy_sparse_dataset=x)
 it = ds.iterator(mode='sequential', batch_size=1)
 it.next()

def test_iterator ( ) : x = csr_matrix ( [ [ 1 , 2 , 0 ] , [ 0 , 0 , 3 ] , [ 4 , 0 , 5 ] ] ) ds = SparseDataset ( from_scipy_sparse_dataset = x ) it = ds . iterator ( mode = 'sequential' , batch_size = 1 ) it . next ( )
tests whether sparsedataset can be loaded and initializes iterator .