Skip to main content

Allows for doing mathematical sigma and pi notation.

Project description

shigma

Shigma is a Python package allowing for sigma (Σ) and pi (Π) notation. It is very easy to learn and works like you'd expect. You'l get the hang of it very fast.

How to use

Sigma

Envision yourself a sigma notation. $$\sum_{i=1}^{10} i^2$$ is this it? This is how you write that in raw Python:

arr = []

for i in range(1, 10 + 1):
  arr.append(i**2)

out = sum(arr)

This is how you write that with shigma. This is how you'd write that with shigma.

out = sigma_not(1, "i**2", 10)

Seems simple enough, right? If you are weird, or appreciate how unicode has become the standard encoding ¯\_(ツ)_/¯. Use the unicode symbol instead!

out = Σ(1, "i**2", 10)

Yeah, unprofessional I know.

Pi

You'll probably be using prodcut notation a lot too. To rewrite this: $$\prod_{i=1}^{10} i^2$$ into Python with the shigma package, you write this

out = pi_not(1, "i**2", 10)

unless of course...

out = Π(1, "i**2", 10)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

shigma-0.0.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page