Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Allows to deal with power series which coefficients contain uncertainties

Project description

https://badge.fury.io/py/unseries.svg https://travis-ci.org/kirienko/unseries.svg?branch=master https://landscape.io/github/kirienko/unseries/master/landscape.png

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for unseries, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size unseries-0.1.0.linux-x86_64.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View
Filename, size unseries-0.1.0-py2.7.egg (9.8 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size unseries-0.1.0-py2-none-any.whl (6.6 kB) File type Wheel Python version py2 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page