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

Method test_changing_array_shape

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

Source from the content-addressed store, hash-verified

60 npt.assert_array_almost_equal( out, a2*b2 )
61
62 def test_changing_array_shape(self):
63 logger.info('Test changing input array shape')
64 a = np.array([1., 2., 3.])
65 b = np.array([4., 5., 6.])
66 a2 = np.arange(self.ssize).astype(a.dtype).reshape( int(self.ssize/20), 4, 5)
67 b2 = np.arange(3.0, self.ssize+3.0).astype(b.dtype).reshape( int(self.ssize/20), 4, 5)
68 out = ne3.NumExpr( 'a*b' )(a=a2, b=b2)
69 npt.assert_array_almost_equal( out, a2*b2 )
70
71 def test_verify_input(self):
72 logger.info('Test input with verify=True')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected