Did I find the right examples for you? yes no

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

src/n/i/nipy-0.3.0/nipy/algorithms/statistics/formula/__init__.py   nipy(Download)
""" Formula and related objects """
from .formulae import (Formula, Term, terms, Factor, make_recarray,
                       natural_spline)
 

src/n/i/nipy-0.3.0/nipy/algorithms/statistics/formula/tests/test_formula.py   nipy(Download)
 
from .. import formulae as F
from ..formulae import terms, Term
 
from nibabel.py3k import asbytes
def test_terms():
    t = terms('a')
    assert_true(isinstance(t, Term))
    a, b, c = Term('a'), Term('b'), Term('c')
    assert_equal(t, a)
    ts = terms(('a', 'b', 'c'))
    assert_equal(ts, (a, b, c))
    # a string without separator chars returns one symbol.  This is the
    # sympy 0.7 behavior
    assert_equal(terms('abc'), Term('abc'))
    assert_equal(terms('abc'), Term('abc'))
    # separators return multiple symbols
    assert_equal(terms('a b c'), (a, b, c))
    assert_equal(terms('a, b, c'), (a, b, c))
    # no arg is an error