MCPcopy Index your code
hub / github.com/numpy/numpy / test_fixed

Method test_fixed

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

Source from the content-addressed store, hash-verified

536 r'\text{14285714.286}\,x^{2} + \text{(1.429e+08)}\,x^{3}$')
537
538 def test_fixed(self):
539 p = poly.Polynomial([1 / 2])
540 assert_equal(str(p), '0.5')
541
542 with printoptions(floatmode='fixed'):
543 assert_equal(str(p), '0.50000000')
544
545 with printoptions(floatmode='fixed', precision=4):
546 assert_equal(str(p), '0.5000')
547
548 def test_switch_to_exp(self):
549 for i, s in enumerate(SWITCH_TO_EXP):

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
printoptionsFunction · 0.90

Tested by

no test coverage detected