Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 663537270
  • Loading branch information
hawkinsp authored and tensorflower-gardener committed Aug 16, 2024
1 parent 7314fd9 commit 215e9cf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def _default_convert_to_tensor_with_dtype(value, dtype,
or np.issubdtype(dtype, np.floating)):
raise MixedTypesError()
if dtype == np.int32 and _is_int64(value):
raise _Int64ToInt32Error(np.array(value, dtype=dtype))
raise _Int64ToInt32Error(np.array(value).astype(dtype))
if dtype == np.bool_:
# Can't downcast an int to a bool
raise TypeConversionError(value, dtype)
Expand Down

0 comments on commit 215e9cf

Please sign in to comment.