Package ComboCode :: Package cc :: Package tools :: Package numerical :: Module Operators
[hide private]
[frames] | no frames]

Module Operators

source code

Module with several methods that function as operators for numerical grids.

Functions [hide private]
array
diff_central(y, x)
Calculate the numerical central difference of a function with respect to a single variable.
source code
Variables [hide private]
  __package__ = 'ComboCode.cc.tools.numerical'
Function Details [hide private]

diff_central(y, x)

source code 

Calculate the numerical central difference of a function with respect to a single variable.

This is essentially what np.gradient does, but allows a non-equidistant independent variable.

Parameters:
  • x (array) - The independent variable
  • y (array) - The variable dependent on x
Returns: array
diff_central(y)/diff_central(x)