MCPcopy
hub / github.com/numpy/numpy / test_floating

Method test_floating

numpy/_core/tests/test_scalar_ctors.py:11–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9
10class TestFromString:
11 def test_floating(self):
12 # Ticket #640, floats from string
13 fsingle = np.single('1.234')
14 fdouble = np.double('1.234')
15 flongdouble = np.longdouble('1.234')
16 assert_almost_equal(fsingle, 1.234)
17 assert_almost_equal(fdouble, 1.234)
18 assert_almost_equal(flongdouble, 1.234)
19
20 def test_floating_overflow(self):
21 """ 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