MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / func

Method func

tensorflow/python/kernel_tests/cwise_ops_unary_test.py:178–185  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

176 def _replace_domain_error_with_inf(self, fn):
177
178 def func(x):
179 try:
180 return fn(x)
181 except ValueError as e:
182 if "domain error" in str(e):
183 return np.inf * np.ones_like(x)
184 else:
185 raise e
186
187 return func
188

Callers

nothing calls this directly

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected