cofunc

Implement a class that represents a continuous function.

Classes

class cofunc.coFunc(x=[], y=[], dtype=None, attrs={})

Represent a continuous function using discrete datapoints (x-y value pairs). Because of the assumption that the x-y value pairs represent a computer approximation of some continuous function, various mathematical operations can be implemented that seem natural from a mathematical viewpoint, but not as trivial in a computer environment where data can have different x-axis discretisations etc.

class cofunc.coFunc2d(x=[], y=[], z=[], dtype=None, attrs={})

Represent a continuous 2D function using discrete datapoints (x-y-z value triples). Because of the assumption that the x-y-z value triples represent a computer approximation of a continuous 2D function, various mathematical operations can be implemented that seem like natural from a mathematical point of view, but not as trivial in a computer environment where the data can have different x- and y-axis discretisations etc.

Functions

cofunc.mean(cofuncs)

Return the mean of the given coFunc objects.

cofunc.var(cofuncs)

Return the variance of the given coFunc objects.

cofunc.intersection(cofuncs, enhance=1)

Return intersection of x-values of the given coFunc objects. Enhance the resolution of the new axis by the given factor.

cofunc.combine(cofuncs, cut=False)

Combine the x-y pairs of the given continuous function objects. Return a new continuous function instance. If cut is True, only the intersection of the x-axes is kept, the rest of the input functions is cut away. In that case, raise an exception if the x-axes do not intersect.

Indices and tables

Table Of Contents

This Page