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

Method __str__

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

Source from the content-addressed store, hash-verified

103 self.out_i = i
104
105 def __str__(self):
106 # only show the number if more than one output exists
107 i_str = "{} ".format(self.out_i) if self.ufunc.nout != 1 else ""
108 return (
109 "Cannot cast ufunc {!r} output {}from {!r} to {!r} with casting "
110 "rule {!r}"
111 ).format(
112 self.ufunc.__name__, i_str, self.from_, self.to, self.casting
113 )
114
115
116@_display_as_base

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected