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

Method test_non_finite

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

Source from the content-addressed store, hash-verified

553 assert str(p).replace('\n', ' ') == s
554
555 def test_non_finite(self):
556 p = poly.Polynomial([nan, inf])
557 assert str(p) == 'nan + inf x'
558 assert p._repr_latex_() == r'$x \mapsto \text{nan} + \text{inf}\,x$'
559 with printoptions(nanstr='NAN', infstr='INF'):
560 assert str(p) == 'NAN + INF x'
561 assert p._repr_latex_() == \
562 r'$x \mapsto \text{NAN} + \text{INF}\,x$'

Callers

nothing calls this directly

Calls 2

printoptionsFunction · 0.90
_repr_latex_Method · 0.80

Tested by

no test coverage detected