celeries.series.Series#

class celeries.series.Series#

Series class.

A series is a sum of coefficient * monomial. It is represented as a dictionary of the form: monomial -> coefficient. It is initialized at 0.

Attributes:
imag

Imaginary part of the series.

real

Real part of the series.

Methods

clean([epsilon])

Clean the series from small coefficients.

clear(/)

Remove all items from the dict.

coefext(monomial)

Extract the coefficient in front of a monomial.

conjugate()

Complex conjugate of the series.

copy()

Copy of the series.

cos()

Cosine of the series.

deriv(x)

Derivative of the series with respect to the variable x.

euclide(B, x)

Euclidian division of the series by B according to variable x: self = B * Q + R.

evalnum(varvalues)

Replace some variables by numerical values.

exp()

Exponential of the series.

expi()

Imaginary exponential of the series.

fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

integ(x)

Integrate the series with respect to the variable x.

items(/)

Return a set-like object providing a view on the dict's items.

keys(/)

Return a set-like object providing a view on the dict's keys.

listvars()

List of variables that appear in the series.

load(filename)

Load a series from a file.

log()

Logarithm of the series.

maxdeg([varlist])

Find the highest degree in the series with respect to the variables in varlist (if provided) or to the truncation variables (if varlist is None).

maxpow(x)

Find the highest exponent of x in the series.

mindeg([varlist])

Find the lowest degree in the series with respect to the variables in varlist (if provided) or to the truncation variables (if varlist is None).

minpow(x)

Find the lowest exponent of x in the series.

pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

reverse(x)

Solve y = self(x) to express x as a series on y.

save(filename)

Save the series to a file.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

sin()

Sine of the series.

sortdegree([varlist])

Sort the terms (monomials) of the series depending on their degree with respect to the variables in varlist (if provided) or to the truncation variables (if varlist is None).

sqrt()

Square root of the series.

subst(x, Q[, power, negative])

Replace a variable by a series.

substvars(newvars)

Replace some variables by other variables.

toConst()

Convert a constant series to a constant value.

toctx()

Evaluate fractional coefficients as floating-point numbers.

update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values(/)

Return an object providing a view on the dict's values.