<commit_before>import unittest
from nose.tools import (assert_is_not_none, assert_raises, assert_equal)

import scipy.sparse
from sknn.mlp import MultiLayerPerceptron as MLP
from sknn.mlp import Layer as L


class TestInputDataTypes(unittest.TestCase):

    def setUp(self):
        self.nn = MLP(layers=[L("Gaussian")], n_iter=1)

    def test_FitSciPySparse(self):
        X, y = scipy.sparse.csr_matrix((8, 4)), scipy.sparse.csr_matrix((8, 4))
        self.nn._fit(X, y)

    def test_PredictSciPySparse(self):
        X, y = scipy.sparse.csr_matrix((8, 4)), scipy.sparse.csr_matrix((8, 4))
        self.nn._fit(X, y)
        self.nn._predict(X)
<commit_msg>Renamed the tests, 1D case supported by code but not possible with scipy.sparse matrices.<commit_after>import unittest
from nose.tools import (assert_is_not_none, assert_raises, assert_equal)

import scipy.sparse
from sknn.mlp import MultiLayerPerceptron as MLP
from sknn.mlp import Layer as L


class TestScipySparseMatrix(unittest.TestCase):

    def setUp(self):
        self.nn = MLP(layers=[L("Gaussian")], n_iter=1)

    def test_Fit2D(self):
        X, y = scipy.sparse.csr_matrix((8, 4)), scipy.sparse.csr_matrix((8, 4))
        self.nn._fit(X, y)

    def test_Predict2D(self):
        X, y = scipy.sparse.csr_matrix((8, 4)), scipy.sparse.csr_matrix((8, 4))
        self.nn._fit(X, y)
        self.nn._predict(X)
{'fraction_non_alphanumeric': 0.1251808972503618, 'fraction_numerical': 0.015195369030390739, 'mean_word_length': 3.720136518771331, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7024771', 'n_tokens_mistral': 552, 'n_tokens_neox': 525, 'n_words': 113}