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

Method test_switch_to_exp

numpy/polynomial/tests/test_printing.py:516–521  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

514 assert_equal(str(p), '0.5000')
515
516 def test_switch_to_exp(self):
517 for i, s in enumerate(SWITCH_TO_EXP):
518 with printoptions(precision=i):
519 p = poly.Polynomial([1.23456789*10**-i
520 for i in range(i//2+3)])
521 assert str(p).replace('\n', ' ') == s
522
523 def test_non_finite(self):
524 p = poly.Polynomial([nan, inf])

Callers

nothing calls this directly

Calls 2

printoptionsFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected