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

Method test_prealloc

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

Source from the content-addressed store, hash-verified

318 npt.assert_array_almost_equal(expr(a=a, b=b), expr.run(a=a, b=b))
319
320 def test_prealloc(self):
321 logger.info( 'Test pre-allocated output evaluate' )
322 a = np.array([1., 2., 3.])
323 b = np.array([4., 5., 6.])
324 c = np.array([7., 8., 9.])
325 y = 2*a + 3*b*c
326 x = np.empty_like(y)
327 ne3.evaluate('x=2*a + 3*b*c')
328 npt.assert_array_equal(x, y)
329
330 def test_magic(self):
331 logger.info( 'Test magic output evaluate' )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected