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

Function _tf_int

tensorflow/python/autograph/operators/py_builtins.py:187–194  ·  view source on GitHub ↗
(x, base)

Source from the content-addressed store, hash-verified

185
186
187def _tf_int(x, base):
188 if base not in (10, UNSPECIFIED):
189 raise NotImplementedError('base {} not supported for int'.format(base))
190
191 # TODO(mdan): We shouldn't assume int32.
192 if x.dtype == dtypes.string:
193 return gen_parsing_ops.string_to_number(x, out_type=dtypes.int32)
194 return math_ops.cast(x, dtype=dtypes.int32)
195
196
197def _py_int(x, base):

Callers 1

int_Function · 0.85

Calls 2

formatMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected