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: 656080533
  • Loading branch information
hawkinsp authored and tensorflower-gardener committed Jul 25, 2024
1 parent 4d69dff commit 2e0a20c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow_gnn/converters/ogb/ogb_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def generate_examples(features: DataTable,
value = feat.float_list.value
elif array.dtype.type in (numpy.bytes_,):
value = feat.bytes_list.value
elif array.dtype.type in (numpy.string_, numpy.str_):
elif array.dtype.type in (numpy.bytes_, numpy.str_):
value = [word.encode("utf-8") for word in feat.bytes_list.value]
else:
raise NotImplementedError(
Expand Down

0 comments on commit 2e0a20c

Please sign in to comment.