Py-polynomial

Latest version: v0.6.2

Safety actively analyzes 641171 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.4.1

🎉 KUDOS TO philippeitis !!! 🍻
New things
* Different `repr()` output. It now shows the code that can reproduce the object instead of a human-friendly informal representation. The latter remains the output of `str()` (e.g. `Polynomial(1, 2, 3)` vs `x^2 + 2x + 3`)
* Polynomials now support slicing:
python
p = Polynomial(4,3,2,1,0)
p[:3] == [0, 1, 2]
p[3:] == [3, 4]
p[2:4] = [8, 8] now p == Polynomial(4, 8, 8, 1, 0)

* Implemented `__neg__`, `__pos__`, `__sub__`, `__rsub__`, `__isub__`, `__imul__`, `__iadd__`.

Fixed things
* Fixed crash when performing multiplication
* Fixed inconsistency and optimized performance when adding polynomials together
* Various other code improvements

0.4.0

Changes
* Removed `polynomials` submodule of package `polynomial`. Now everything is defined in `polynomial`.

0.3.1

New stuff
* Added coefficient getters and setters by letter name convention `ax^n + bx^{n-1} + cx^{n-2} + ... + yx + z`. For example:
python3
p = Polynomial(12, 5, 8, 9)
p.a == p.A == 12 == p[3]
p.b == p.B == 5 == p[2]
p.c == p.C == 8 == p[1]
p.d == p.D == 9 == p[0]

* Now all classes are within the `polynomials` submodule of the `polynomial` module.
* Zero-polynomials's degree is now equal to `-math.inf` instead of `-1`

Fixed stuff
* Crash related to the fact that the Monomial's degree can only be a natural number

0.2

New things
* Fix package name

0.1

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.