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

Method _str_term_unicode

numpy/polynomial/_polybase.py:399–410  ·  view source on GitHub ↗

String representation of single polynomial term using unicode characters for superscripts and subscripts.

(cls, i, arg_str)

Source from the content-addressed store, hash-verified

397
398 @classmethod
399 def _str_term_unicode(cls, i, arg_str):
400 """
401 String representation of single polynomial term using unicode
402 characters for superscripts and subscripts.
403 """
404 if cls.basis_name is None:
405 raise NotImplementedError(
406 "Subclasses must define either a basis_name, or override "
407 "_str_term_unicode(cls, i, arg_str)"
408 )
409 return (f"·{cls.basis_name}{i.translate(cls._subscript_mapping)}"
410 f"({arg_str})")
411
412 @classmethod
413 def _str_term_ascii(cls, i, arg_str):

Callers

nothing calls this directly

Calls 1

translateMethod · 0.80

Tested by

no test coverage detected