Skip to content

Commit

Permalink
Replace np.math.factorial -> math.factorial
Browse files Browse the repository at this point in the history
  • Loading branch information
schmrlng committed Oct 10, 2024
1 parent 3df209c commit 2b3bc16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hj_reachability/finite_differences/upwind_first_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import math

from absl.testing import absltest
import jax
import numpy as np
Expand Down Expand Up @@ -47,7 +49,7 @@ def _divided_difference(x, i, spacing=1):
if isinstance(i, int):
return x[i]
order = len(i) - 1
return np.diff(x[i], order)[0] / (np.math.factorial(order) * spacing**order)
return np.diff(x[i], order)[0] / (math.factorial(order) * spacing**order)

v = np.array(boundary_condition(values, order))
x = np.arange(len(v)) * spacing
Expand Down

0 comments on commit 2b3bc16

Please sign in to comment.