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

Method test_empty

numpy/linalg/tests/test_linalg.py:1249–1252  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1247class _TestNormGeneral(_TestNormBase):
1248
1249 def test_empty(self):
1250 assert_equal(norm([]), 0.0)
1251 assert_equal(norm(array([], dtype=self.dt)), 0.0)
1252 assert_equal(norm(atleast_2d(array([], dtype=self.dt))), 0.0)
1253
1254 def test_vector_return_type(self):
1255 a = np.array([1, 0, 1])

Callers

nothing calls this directly

Calls 4

assert_equalFunction · 0.90
normFunction · 0.90
arrayFunction · 0.90
atleast_2dFunction · 0.90

Tested by

no test coverage detected