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

Method test_allclose_timedelta

numpy/ma/tests/test_core.py:3156–3161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3154 assert_(allclose(a, a))
3155
3156 def test_allclose_timedelta(self):
3157 # Allclose currently works for timedelta64 as long as `atol` is
3158 # an integer or also a timedelta64
3159 a = np.array([[1, 2, 3, 4]], dtype="m8[ns]")
3160 assert allclose(a, a, atol=0)
3161 assert allclose(a, a, atol=np.timedelta64(1, "ns"))
3162
3163 def test_allany(self):
3164 # Checks the any/all methods/functions.

Callers

nothing calls this directly

Calls 1

allcloseFunction · 0.90

Tested by

no test coverage detected