openmc.data.linearize

openmc.data.linearize(x, f, tolerance=0.001)[source]

Return a tabulated representation of a one-variable function

Parameters
  • x (Iterable of float) – Initial x values at which the function should be evaluated

  • f (Callable) – Function of a single variable

  • tolerance (float) – Tolerance on the interpolation error

Returns

  • numpy.ndarray – Tabulated values of the independent variable

  • numpy.ndarray – Tabulated values of the dependent variable