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

Method test_floating

numpy/core/tests/test_scalar_ctors.py:12–19  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10
11class TestFromString:
12 def test_floating(self):
13 # Ticket #640, floats from string
14 fsingle = np.single('1.234')
15 fdouble = np.double('1.234')
16 flongdouble = np.longdouble('1.234')
17 assert_almost_equal(fsingle, 1.234)
18 assert_almost_equal(fdouble, 1.234)
19 assert_almost_equal(flongdouble, 1.234)
20
21 def test_floating_overflow(self):
22 """ Strings containing an unrepresentable float overflow """

Callers

nothing calls this directly

Calls 2

assert_almost_equalFunction · 0.90
doubleMethod · 0.80

Tested by

no test coverage detected