File: test_bspline.py

package info (click to toggle)
python-scipy 0.6.0-12
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 32,016 kB
  • ctags: 46,675
  • sloc: cpp: 124,854; ansic: 110,614; python: 108,664; fortran: 76,260; objc: 424; makefile: 384; sh: 10
file content (23 lines) | stat: -rw-r--r-- 498 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""
Test functions for models.glm
"""

import numpy as N
from numpy.testing import NumpyTest, NumpyTestCase

import scipy.sandbox.models as S
import scipy.sandbox.models.bspline as B


class test_BSpline(NumpyTestCase):

    def test1(self):
        b = B.BSpline(N.linspace(0,10,11), x=N.linspace(0,10,101))
        old = b._basisx.shape
        b.x = N.linspace(0,10,51)
        new = b._basisx.shape
        self.assertEqual((old[0], 51), new)


if __name__ == "__main__":
    NumpyTest().run()