MCPcopy Create free account
hub / github.com/pytorch/executorch / __float__

Method __float__

exir/pass_base.py:166–171  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

164 return int(self.data)
165
166 def __float__(self):
167 if isinstance(self.data, torch.SymFloat):
168 raise ExportPassBaseError(
169 "ProxyValue with SymFloat data cannot be converted to float."
170 )
171 return float(self.data)
172
173 def __index__(self):
174 if isinstance(self.data, torch.SymInt):

Callers

nothing calls this directly

Calls 1

ExportPassBaseErrorClass · 0.85

Tested by

no test coverage detected