MCPcopy Create free account
hub / github.com/pydata/numexpr / test_rational_func

Method test_rational_func

numexpr3/tests/test_numexpr.py:117–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

115 npt.assert_array_almost_equal(x, locals()['out'] )
116
117 def test_rational_func(self):
118 logger.info( 'Test rational func' )
119 a = np.arange(self.ssize)
120 b = np.arange(self.ssize) * 0.1
121 func = ne3.NumExpr( '(a + 2.0*b) / (1 + a + 4*b*b)' )
122 x = (a + 2 * b) / (1 + a + 4 * b * b)
123 y = func(a=a, b=b)
124 npt.assert_array_almost_equal(x, y)
125
126 def test_secondary_output(self):
127 logger.info( 'Test two outputs' )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected