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

Method __str__

numpy/core/_exceptions.py:87–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 self.in_i = i
86
87 def __str__(self):
88 # only show the number if more than one input exists
89 i_str = "{} ".format(self.in_i) if self.ufunc.nin != 1 else ""
90 return (
91 "Cannot cast ufunc {!r} input {}from {!r} to {!r} with casting "
92 "rule {!r}"
93 ).format(
94 self.ufunc.__name__, i_str, self.from_, self.to, self.casting
95 )
96
97
98@_display_as_base

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected