MCPcopy Create free account
hub / github.com/numpy/numpy / test_trapz_matrix

Function test_trapz_matrix

numpy/matrixlib/tests/test_interaction.py:244–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

242
243
244def test_trapz_matrix():
245 # Test to make sure matrices give the same answer as ndarrays
246 # 2018-04-29: moved here from core.tests.test_function_base.
247 x = np.linspace(0, 5)
248 y = x * x
249 r = np.trapz(y, x)
250 mx = np.matrix(x)
251 my = np.matrix(y)
252 mr = np.trapz(my, mx)
253 assert_almost_equal(mr, r)
254
255
256def test_ediff1d_matrix():

Callers

nothing calls this directly

Calls 2

assert_almost_equalFunction · 0.90
linspaceMethod · 0.80

Tested by

no test coverage detected