docstr: Replaces the parameters of the discretization with new ones. The domain
  is not changed.
  
  Args:
    new_params (PyTree): The new parameters of the discretization.
  
  Returns:
    OnGrid: A linear discretization with the new parameters.
docstr_tok: ["Replaces","the","parameters","of","the","discretization","with","new","ones",".","The","domain","is","not","changed",".","Args",":","new_params","(","PyTree",")",":","The","new","parameters","of","the","discretization",".","Returns",":","OnGrid",":","A","linear","discretization","with","the","new","parameters","."]
code: def replace_params(self, new_params):
      r"""Replaces the parameters of the discretization with new ones. The domain
      is not changed.
  
      Args:
        new_params (PyTree): The new parameters of the discretization.
  
      Returns:
        OnGrid: A linear discretization with the new parameters.
      """
      return self.__class__(new_params, self.domain)
  
imports: import warnings
  from typing import Callable, TypeVar
  import equinox
  from equinox import tree_equal
  from jax import eval_shape
  from jax import numpy
  from jax import vmap
  from jaxtyping import PyTree
  from jaxdf.core import Field
  from jaxdf.geometry import Domain
label_desc: Use image node_id 7 for calling the OnGrid obj's underlying member method code with example usage: obj.replace_params(new_params) and returns: self