From 7862d7383150b7302112ecc51fe14485383d6117 Mon Sep 17 00:00:00 2001 From: JMW_1999 <54145971+Zero-coder@users.noreply.github.com> Date: Wed, 20 Dec 2023 13:56:18 +0800 Subject: [PATCH] Update example.py --- scripts/example.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/example.py b/scripts/example.py index 3022043..a69a834 100644 --- a/scripts/example.py +++ b/scripts/example.py @@ -334,6 +334,12 @@ def prepare_prompt(*, prompt: str, prompt_assets: dict, views: list[str]): # add mask token["mask"] = { view: np.ones((n_objs_prompt[view],), dtype=np.bool) + ''' + np.bool has been deprecated/discarded, since numpy 1.20. + Solution for using newest version numpy. place with + + ''' + # view: np.ones((n_objs_prompt[view],), dtype=bool) for view in views } n_objs_to_pad = { @@ -354,6 +360,11 @@ def prepare_prompt(*, prompt: str, prompt_assets: dict, views: list[str]): }, "mask": { view: np.zeros((n_objs_to_pad[view]), dtype=np.bool) + ''' + np.bool has been deprecated/discarded, since numpy 1.20. + Solution for using newest version numpy. place with + ''' + # view: np.zeros((n_objs_to_pad[view]), dtype=bool) for view in views }, }