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

Method as_latex

numpy/polynomial/tests/test_printing.py:379–387  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

377 """Test the latex repr used by Jupyter"""
378
379 def as_latex(self, obj):
380 # right now we ignore the formatting of scalars in our tests, since
381 # it makes them too verbose. Ideally, the formatting of scalars will
382 # be fixed such that tests below continue to pass
383 obj._repr_latex_scalar = lambda x, parens=False: str(x)
384 try:
385 return obj._repr_latex_()
386 finally:
387 del obj._repr_latex_scalar
388
389 def test_simple_polynomial(self):
390 # default input

Callers 4

test_basis_funcMethod · 0.95
test_symbol_basicMethod · 0.95

Calls 1

_repr_latex_Method · 0.80

Tested by

no test coverage detected