skip to navigation
skip to content

unseries 0.1.0

Allows to deal with power series which coefficients contain uncertainties

This package allows to deal with power series which coefficients contain uncertainties.

It is build on top of uncertainties python package (see here).

Scope

For now the following fuctions are available:
  • series addition and subtraction
  • comparision (greater than, less than)
  • series multiplication
  • series inversion, i.e. Z(g) ➝ 1/Z(g)
  • series division (in the assumption that all powers are non-negative)
  • exponentiation
  • analitic differentiation
  • substitution, i.e. calculation of a series Z(g) at the point g₀ to a number with uncertainty
  • approximation
  • some technical functions: pprint, save [to file],

Example

Assume two series:

Z₁(g) =  1.00(30) +  2.0000(30) g

Z₂(g) = -1.0(4) - 2.000(4) g + 999.00(10) g²

Then Z₁+Z₂ = 0.0(5) + 0.000(5) g + 999.00(10) g²

from unseries import Series
z1 = Series(2, {0: ufloat(1, 0.3), 1: ufloat(2, .003)})
z2 = Series(3, {0: ufloat(-1, 0.4), 1: ufloat(-2, .004), 2: ufloat(999, .1)})
print z1 + z2
 
File Type Py Version Uploaded on Size
unseries-0.1.0-py2-none-any.whl (md5) Python Wheel py2 2017-06-19 6KB
unseries-0.1.0-py2.7.egg (md5) Python Egg 2.7 2017-06-19 9KB
unseries-0.1.0.linux-x86_64.tar.gz (md5) Source 2017-06-19 7KB