Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

np.product -> np.prod for np 2.0 compatibility #147

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions robohive/envs/multi_task/multi_task_base_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ def get_reward_dict(self, obs_dict):
# Optional Keys
("obj_goal", -np.sum(goal_dist, axis=-1)),
("bonus",
1.0*np.product(goal_dist < 5 * self.obj["dof_proximity"], axis=-1)
1.0*np.prod(goal_dist < 5 * self.obj["dof_proximity"], axis=-1)
# np.product(goal_dist < 0.75 * self.obj["dof_ranges"], axis=-1)
+ 1.0*np.product(goal_dist < 1.67 * self.obj["dof_proximity"], axis=-1),
+ 1.0*np.prod(goal_dist < 1.67 * self.obj["dof_proximity"], axis=-1),
# + np.product(goal_dist < 0.25 * self.obj["dof_ranges"], axis=-1),
),
("pose", -np.sum(np.abs(obs_dict["pose_err"]), axis=-1)),
Expand Down Expand Up @@ -272,4 +272,4 @@ def set_obj_goal(self, obj_goal=None, interact_site=None):
elif type(interact_site) is str: # overwrite using name
self.interact_sid = self.sim.model.site_name2id(interact_site)
elif type(interact_site) is int: # overwrite using id
self.interact_sid = interact_site
self.interact_sid = interact_site
Loading