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

Method test_fixed

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

Source from the content-addressed store, hash-verified

504 r'\text{14285714.286}\,x^{2} + \text{(1.429e+08)}\,x^{3}$')
505
506 def test_fixed(self):
507 p = poly.Polynomial([1/2])
508 assert_equal(str(p), '0.5')
509
510 with printoptions(floatmode='fixed'):
511 assert_equal(str(p), '0.50000000')
512
513 with printoptions(floatmode='fixed', precision=4):
514 assert_equal(str(p), '0.5000')
515
516 def test_switch_to_exp(self):
517 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