MCPcopy Create free account
hub / github.com/numpy/numpy / test_basis_func

Method test_basis_func

numpy/polynomial/tests/test_printing.py:410–417  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

408 r'$x \mapsto 1.0 + 2.0\,\left(1.0 + 2.0x\right) + 3.0\,\left(1.0 + 2.0x\right)^{2}$')
409
410 def test_basis_func(self):
411 p = poly.Chebyshev([1, 2, 3])
412 assert_equal(self.as_latex(p),
413 r'$x \mapsto 1.0\,{T}_{0}(x) + 2.0\,{T}_{1}(x) + 3.0\,{T}_{2}(x)$')
414 # affine input - check no surplus parens are added
415 p = poly.Chebyshev([1, 2, 3], domain=[-1, 0])
416 assert_equal(self.as_latex(p),
417 r'$x \mapsto 1.0\,{T}_{0}(1.0 + 2.0x) + 2.0\,{T}_{1}(1.0 + 2.0x) + 3.0\,{T}_{2}(1.0 + 2.0x)$')
418
419 def test_multichar_basis_func(self):
420 p = poly.HermiteE([1, 2, 3])

Callers

nothing calls this directly

Calls 2

as_latexMethod · 0.95
assert_equalFunction · 0.90

Tested by

no test coverage detected