Skip to content

Commit 2af59a1

Browse files
hawkinspcopybara-github
authored andcommitted
[NumPy] Fix uses of functions deprecated in NumPy 1.25.
NumPy 1.25 deprecates a number of function aliases (https://github.com/numpy/numpy/releases/tag/v1.25.0rc1) This change replaces uses of the deprecated names with their recommended replacements: * `np.round_` -> `np.round` * `np.product` -> `np.prod` * `np.cumproduct` -> `np.cumprod` * `np.sometrue` -> `np.any` * `np.alltrue` -> `np.all` The deprecated functions will issue a `DeprecationWarning` under NumPy 1.25, and will be removed in NumPy 2.0. PiperOrigin-RevId: 538825144 Change-Id: I484747bcf8d0a64b78e7163df940fd5a734b3e5c
1 parent 6fce666 commit 2af59a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dm_control/suite/dog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def get_reward_factors(self, physics):
342342

343343
def get_reward(self, physics):
344344
"""Returns the reward, product of reward factors."""
345-
return np.product(self.get_reward_factors(physics))
345+
return np.prod(self.get_reward_factors(physics))
346346

347347

348348
class Move(Stand):

0 commit comments

Comments
 (0)