MCPcopy
hub / github.com/numpy/numpy / test_sort_real

Method test_sort_real

numpy/lib/tests/test_function_base.py:4773–4779  ·  view source on GitHub ↗
(self, type_in, type_out)

Source from the content-addressed store, hash-verified

4771 ('g', 'G'),
4772 ])
4773 def test_sort_real(self, type_in, type_out):
4774 # sort_complex() type casting for real input types
4775 a = np.array([5, 3, 6, 2, 1], dtype=type_in)
4776 actual = np.sort_complex(a)
4777 expected = np.sort(a).astype(type_out)
4778 assert_equal(actual, expected)
4779 assert_equal(actual.dtype, expected.dtype)
4780
4781 def test_sort_complex(self):
4782 # sort_complex() handling of complex input

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
astypeMethod · 0.80
sortMethod · 0.45

Tested by

no test coverage detected