Skip to content

Commit

Permalink
[numpy] Fix test failures under NumPy 2.0.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 662464570
Change-Id: I1bc49f7792e36b8cef28623b7ed40d7eff48dc84
  • Loading branch information
hawkinsp authored and copybara-github committed Aug 13, 2024
1 parent 30a1bbe commit 3744cbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tf_agents/utils/example_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def _encode_to_int64_list(value):

return _encode_to_int64_list
else: # Serialize anything else to BytesList in little endian order.
le_dtype = dtype.as_numpy_dtype(0).newbyteorder('L')
le_dtype = np.dtype(dtype.as_numpy_dtype(0)).newbyteorder('L')

def _encode_to_bytes_list(value):
value = np.asarray(value)
Expand Down

0 comments on commit 3744cbc

Please sign in to comment.