Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/olivierverdier/polynomial

Simple Polynomial class in Python
https://github.com/olivierverdier/polynomial

Last synced: about 5 hours ago
JSON representation

Simple Polynomial class in Python

Awesome Lists containing this project

README

        

# Simple Polynomial class in Python/numpy

## Usage

```python
from polynomial import *

p = Polynomial([2.,3.])
p(2.) # value of 2 + 3X at 2., i.e., 8

p2 = 2 + 3*X

p == p2 # True

p.zeros() # list of zeros
```

Check out the [associated notebook](https://gist.github.com/olivierverdier/d939d4e0b4de8fbd9c26328a834721ab).

## Testing

Run:

```bash
pytest test_polynomial.py
```