Skip to content

Commit 7862d73

Browse files
authored
Update example.py
1 parent 8449837 commit 7862d73

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/example.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ def prepare_prompt(*, prompt: str, prompt_assets: dict, views: list[str]):
334334
# add mask
335335
token["mask"] = {
336336
view: np.ones((n_objs_prompt[view],), dtype=np.bool)
337+
'''
338+
np.bool has been deprecated/discarded, since numpy 1.20.
339+
Solution for using newest version numpy. place <np.bool> with <bool>
340+
341+
'''
342+
# view: np.ones((n_objs_prompt[view],), dtype=bool)
337343
for view in views
338344
}
339345
n_objs_to_pad = {
@@ -354,6 +360,11 @@ def prepare_prompt(*, prompt: str, prompt_assets: dict, views: list[str]):
354360
},
355361
"mask": {
356362
view: np.zeros((n_objs_to_pad[view]), dtype=np.bool)
363+
'''
364+
np.bool has been deprecated/discarded, since numpy 1.20.
365+
Solution for using newest version numpy. place <np.bool> with <bool>
366+
'''
367+
# view: np.zeros((n_objs_to_pad[view]), dtype=bool)
357368
for view in views
358369
},
359370
}

0 commit comments

Comments
 (0)