Skip to content

Commit

Permalink
[numpy] Fix users of NumPy APIs that are removed in NumPy 2.0.
Browse files Browse the repository at this point in the history
This change migrates users of APIs removed in NumPy 2.0 to their recommended replacements (https://numpy.org/devdocs/numpy_2_0_migration_guide.html).

PiperOrigin-RevId: 655916407
  • Loading branch information
hawkinsp authored and t5-copybara committed Jul 25, 2024
1 parent 31410cc commit f17e82f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t5x/decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ def top_k_two_stage(x, k):
x,
((0, 0), (0, num_samples_rounded_up - num_samples)),
mode='constant',
constant_values=np.NINF,
constant_values=-np.inf,
)
num_samples = num_samples_rounded_up
# Reshape input tensor to fill lanes.
Expand Down

0 comments on commit f17e82f

Please sign in to comment.