MCPcopy Index your code
hub / github.com/numpy/numpy / test_times

Method test_times

numpy/lib/tests/test_function_base.py:907–917  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

905 assert_equal(len(output_n), max(0, len(x) - n))
906
907 def test_times(self):
908 x = np.arange('1066-10-13', '1066-10-16', dtype=np.datetime64)
909 expected = [
910 np.array([1, 1], dtype='timedelta64[D]'),
911 np.array([0], dtype='timedelta64[D]'),
912 ]
913 expected.extend([np.array([], dtype='timedelta64[D]')] * 3)
914 for n, exp in enumerate(expected, start=1):
915 out = diff(x, n=n)
916 assert_array_equal(out, exp)
917 assert_equal(out.dtype, exp.dtype)
918
919 def test_subclass(self):
920 x = ma.array([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],

Callers

nothing calls this directly

Calls 3

diffFunction · 0.90
assert_array_equalFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected