Skip to main content

A mathematical and financial function curve utility library.

Project description

curvepy

Tests

A mathematical and financial function curve utility library for Python.

Installation

With poetry:

poetry add curvepy

Or with pip:

pip3 install curvepy

Usage

Have a look at the documentation.

Basic usage:

# Create a line
from curvepy import Line

line = Line(const=1, slope=2)
assert line.y(0) == 1
assert line.y(1) == 3

# Function arithmetic
line2 = Line(const=-1, slope=-2)
line_sum = line1 + line2
assert line_sum.y(0) == 0
assert line_sum.y(1) == 0

Development

Updating Documentation

The module pdoc3 is used to automatically generate documentation. To update the documentation:

  1. Install pdoc3 if needed with pip3 install pdoc3.
  2. Navigate to project root and install dependencies: poetry install.
  3. Generate documetation files with: pdoc3 -o docs --html curvepy.
  4. The new files will be in docs/curvepy. Move them to docs/ and replace existing files.

Project details


Download files

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

Source Distribution

curvepy-0.1.0.tar.gz (34.8 kB view hashes)

Uploaded Source

Built Distribution

curvepy-0.1.0-py3-none-any.whl (44.7 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