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: 663776255
  • Loading branch information
hawkinsp authored and copybara-github committed Aug 16, 2024
1 parent f8acd28 commit ee31040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion language_table/common/clip_tokenizer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _simple_tokenize(tokenizer, texts, context_length = 77):
all_tokens = [
[sot_token] + tokenizer.encode(text) + [eot_token] for text in texts
]
result = np.zeros((len(all_tokens), context_length), dtype=np.compat.long)
result = np.zeros((len(all_tokens), context_length), dtype=int)

for i, tokens in enumerate(all_tokens):
if len(tokens) > context_length:
Expand Down

0 comments on commit ee31040

Please sign in to comment.