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

Method test__total_size

numpy/core/tests/test__exceptions.py:47–53  ·  view source on GitHub ↗

Test e._total_size

(self)

Source from the content-addressed store, hash-verified

45 assert f(Ki*Ki*Ki*Ki*Ki*Ki*123456) == '123456. EiB'
46
47 def test__total_size(self):
48 """ Test e._total_size """
49 e = _ArrayMemoryError((1,), np.dtype(np.uint8))
50 assert e._total_size == 1
51
52 e = _ArrayMemoryError((2, 4), np.dtype((np.uint64, 16)))
53 assert e._total_size == 1024
54
55
56class TestUFuncNoLoopError:

Callers

nothing calls this directly

Calls 2

_ArrayMemoryErrorClass · 0.85
dtypeMethod · 0.45

Tested by

no test coverage detected