def process_rewards(self, rewards):
    """Clips, rounds, and changes to integer type.

    Args:
      rewards: numpy array of raw (float) rewards.

    Returns:
      processed_rewards: numpy array of np.int64
    """

    min_reward, max_reward = self.reward_range

    # Clips at min and max reward.
    rewards = np.clip(rewards, min_reward, max_reward)
    # Round to (nearest) int and convert to integral type.
    rewards = np.around(rewards, decimals=0).astype(np.int64)
    return rewards
Clips, rounds, and changes to integer type.

    Args:
      rewards: numpy array of raw (float) rewards.

    Returns:
      processed_rewards: numpy array of np.int64