(self, x, dtype, use_gpu=False)
| 55 | return None |
| 56 | |
| 57 | def _cast(self, x, dtype, use_gpu=False): |
| 58 | with self.cached_session(use_gpu=use_gpu): |
| 59 | val = constant_op.constant(x, self._toDataType(np.array([x]).dtype)) |
| 60 | return math_ops.cast(val, self._toDataType(dtype), name="cast").eval() |
| 61 | |
| 62 | def _test(self, x, dtype, use_gpu=False): |
| 63 | """Tests cast(x) to dtype behaves the same as numpy.astype.""" |
no test coverage detected