<s> import numpy as np <EOL> import numpy . random as npr <EOL> import kayak <EOL> from . import * <EOL> def test_constant_scalar ( ) : <EOL> npr . seed ( <NUM_LIT:1> ) <EOL> for ii in xrange ( NUM_TRIALS ) : <EOL> np_X = npr . randn ( ) <EOL> X = kayak . Constant ( np_X ) <EOL> assert close_float ( X . value , np_X ) <EOL> def test_constant_vector ( ) : <EOL> npr . seed ( <NUM_LIT:1> ) <EOL> for ii in xrange ( NUM_TRIALS ) : <EOL> np_X = npr . randn ( <NUM_LIT:10> ) <EOL> X = kayak . Constant ( np_X ) <EOL> assert np . all ( close_float ( X . value , np_X ) ) <EOL> def test_constant_matrix ( ) : <EOL> npr . seed ( <NUM_LIT:1> ) <EOL> for ii in xrange ( NUM_TRIALS ) : <EOL> np_X = npr . randn ( <NUM_LIT:10> , <NUM_LIT:20> ) <EOL> X = kayak . Constant ( np_X ) <EOL> assert np . all ( close_float ( X . value , np_X ) ) </s>
