code: def test_finite_difference_derivative():
      domain = geometry.Domain((11,), (0.5,))
      params = jnp.zeros((11, 1))
      params = params.at[5].set(1.0)
      u = FiniteDifferences(params, domain, accuracy=4)
      du = operators.gradient(u)
  
      kernel = operators.gradient.default_params(u)
      print(kernel)
  
      grid_values = du.on_grid[:, 0]
      true_values = jnp.asarray(
          [
              0.0,
              -0.0,
              0.0,
              -0.16666667,
              1.33333333,
              0.0,
              -1.33333333,
              0.16666667,
              0.0,
              0.0,
              0.0,
          ]
      )
      assert jnp.allclose(grid_values, true_values)
  
file_path: jaxdf/tests/test_differential.py
imports: import jax
  from jax import jit, make_jaxpr
  from jax import numpy
  from jaxdf import *
label_desc: Use image node_id 9 for calling a global function with example usage: test_finite_difference_derivative() without return types