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

Method test_non_finite

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

Source from the content-addressed store, hash-verified

521 assert str(p).replace('\n', ' ') == s
522
523 def test_non_finite(self):
524 p = poly.Polynomial([nan, inf])
525 assert str(p) == 'nan + inf x'
526 assert p._repr_latex_() == r'$x \mapsto \text{nan} + \text{inf}\,x$'
527 with printoptions(nanstr='NAN', infstr='INF'):
528 assert str(p) == 'NAN + INF x'
529 assert p._repr_latex_() == \
530 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