Skip to content

Commit

Permalink
s,np.bool\b,bool,
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookresearch/Generic-Grouping#16

X-link: facebookresearch/Detectron#1047

X-link: facebookincubator/zstrong#582

`np.bool` and `bool` are identical, but the former is removed from Numpy-1.24.X.

Differential Revision: D49196618
  • Loading branch information
igorsugak authored and facebook-github-bot committed Sep 12, 2023
1 parent bec604b commit 33e7260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mm_action_prediction/loaders/loader_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _ship_helper(self, numpy_array):
# int32 get mapped to int64 and float to double
if numpy_array.dtype == np.int32 or numpy_array.dtype == np.int64:
new_type = torch.int64
elif numpy_array.dtype == np.bool:
elif numpy_array.dtype == bool:
new_type = torch.bool
else:
new_type = torch.float
Expand Down
2 changes: 1 addition & 1 deletion mm_action_prediction/loaders/loader_simmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def interactive_batch(self, input_str, round_id):
{
"user_utt": enc_in,
"user_utt_len": enc_len,
"dialog_mask": np.ones((1, 1), dtype=np.bool),
"dialog_mask": np.ones((1, 1), dtype=bool),
"round_id": np.array([round_id], dtype="int32"),
}
)
Expand Down

0 comments on commit 33e7260

Please sign in to comment.