IndexBase Function¶
IndexBase function module.
SymPy doesn’t provide a direct way to create symbolic functions with lazy derivatives. This module provides a way to create such functions by extending the sp.Function class and overriding the _eval_derivative method to return a sp.Derivative object without evaluating it.
- idx_function(name: str) Function[source]¶
Create a symbolic function with lazy derivative.
- Parameters:
name (str) – Name of the symbolic function to create.
- Returns:
A symbolic function class with a lazy derivative.
- Return type:
sp.Function
- lazy_derivative(self: Function, s: Symbol) Derivative[source]¶
Return a lazy derivative of the symbolic function (self).
- Parameters:
self (sp.Function) – lazy_function_class instance
s (sp.Symbol) – Symbol with respect to which the derivative is taken.
- Returns:
A simple SymPy derivative object without evaluation.
- Return type:
sp.Derivative