def METHOD_NAME():
    for sparse in [csc_matrix, csr_matrix]:
        X_sparse = sparse(Xdigits[:100])
        X = Xdigits[:100].copy()
        rbm1 = BernoulliRBM(
            n_components=64, learning_rate=0.1, batch_size=10, random_state=9
        )
        rbm2 = BernoulliRBM(
            n_components=64, learning_rate=0.1, batch_size=10, random_state=9
        )
        rbm1.partial_fit(X_sparse)
        rbm2.partial_fit(X)
        assert_almost_equal(
            rbm1.score_samples(X).mean(), rbm2.score_samples(X).mean(), decimal=0
        )