Explicitly convert obj based on numpy type except for string type.
(numpy_dtype, obj)
| 142 | |
| 143 | |
| 144 | def _convert_to_numpy_obj(numpy_dtype, obj): |
| 145 | """Explicitly convert obj based on numpy type except for string type.""" |
| 146 | return numpy_dtype(obj) if numpy_dtype is not object else str(obj) |
| 147 | |
| 148 | |
| 149 | def register_session_run_conversion_functions( |