<commit_before>"""
Test functions for models.bspline
"""

import numpy as np
from numpy.testing import *
import neuroimaging.fixes.scipy.stats.models.bspline as bsp

class TestBSpline(TestCase):

    def test1(self):
        b = bsp.BSpline(np.linspace(0,10,11), x=np.linspace(0,10,101))
        old = b._basisx.shape<commit_msg>Remove pynifti from nipy, now an external dependency.<commit_after>import warnings

import numpy as np
from neuroimaging.testing import *

bsp = None

def setup():
    # Suppress warnings during tests to reduce noise
    warnings.simplefilter("ignore")
    # import bspline module after suppressing UserWarnings
    global bsp
    import neuroimaging.fixes.scipy.stats.models.bspline as bsp

def teardown():
    # Clear list of warning filters
    warnings.resetwarnings()


class TestBSpline(TestCase):

    def test1(self):
        b = bsp.BSpline(np.linspace(0,10,11), x=np.linspace(0,10,101))
        old = b._basisx.shape
{'fraction_non_alphanumeric': 0.10157068062827225, 'fraction_numerical': 0.025130890052356022, 'mean_word_length': 3.877551020408163, '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': '5998204', 'n_tokens_mistral': 332, 'n_tokens_neox': 319, 'n_words': 81}