Skip to content

Commit

Permalink
Merge pull request #167 from invrs-io/types
Browse files Browse the repository at this point in the history
fix type errors
  • Loading branch information
mfschubert authored Jan 22, 2025
2 parents 6d5fd90 + 20a48f1 commit 87abb59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/invrs_gym/utils/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def rescaled_density_array(
upper_bound: float,
) -> jnp.ndarray:
"""Return a density array for specified lower and upper bounds."""
array = density.array - density.lower_bound
array /= density.upper_bound - density.lower_bound
array *= upper_bound - lower_bound
array = jnp.asarray(density.array - density.lower_bound)
array /= jnp.asarray(density.upper_bound - density.lower_bound)
array *= jnp.asarray(upper_bound - lower_bound)
return jnp.asarray(array + lower_bound)


Expand Down

0 comments on commit 87abb59

Please sign in to comment.