

def test_TrainConstantOneEpoch(self):
    for t in ['csr_matrix', 'csc_matrix']:
        sparse_matrix = getattr(scipy.sparse, t)
        (X_s, y_s) = (sparse_matrix((8, 16), dtype=numpy.float32), sparse_matrix((8, 16), dtype=numpy.float32))
        (X, y) = (X_s.toarray(), y_s.toarray())
        nn1 = MLP(layers=[L('Linear')], n_iter=1, random_state=1234)
        nn1._fit(X, y)
        nn2 = MLP(layers=[L('Linear')], n_iter=1, random_state=1234)
        nn2._fit(X_s, y_s)
        assert_true(numpy.all((nn1._predict(nn2) == nn1._predict(X_s))))

dataset/ETHPy150Open aigamedev/scikit-neuralnetwork/sknn/tests/test_types.py TestFormatDeterminism.test_TrainConstantOneEpoch/VarMisuse@163/220 `X_s`->`nn2`