diff options
author | Jeff <3820914+jeffyancey@users.noreply.github.com> | 2018-08-26 14:16:12 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2018-08-26 15:16:12 -0500 |
commit | d210300bc1b1a849a5df618b47b00cba501f51b4 (patch) | |
tree | 6836a1343fbd2cff46f82200b3707de7ad42c310 /doc/source/reference/routines.polynomials.classes.rst | |
parent | 63a57c3f6a58c61763daf89a2d5495f6a855bf9b (diff) | |
download | numpy-d210300bc1b1a849a5df618b47b00cba501f51b4.tar.gz |
DOC: Polybase augmented assignment notes (#11806)
* Add augmented assignment for supported operations
Add augmented assignments for `+=`, `-=`, `*=`, `/=`, `%=`, and `**=`.
* correct idiv and imod
* remove augomented operationa. add notes.
Explicitly state the intention that all instances of a polynomial baseclass are immutable.
* fix typo, remove Note from _polybase
Diffstat (limited to 'doc/source/reference/routines.polynomials.classes.rst')
-rw-r--r-- | doc/source/reference/routines.polynomials.classes.rst | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/doc/source/reference/routines.polynomials.classes.rst b/doc/source/reference/routines.polynomials.classes.rst index f44ddd46c..da0394305 100644 --- a/doc/source/reference/routines.polynomials.classes.rst +++ b/doc/source/reference/routines.polynomials.classes.rst @@ -35,11 +35,11 @@ degree :math:`n`, but could just as easily be the basis functions of any of the other classes. The convention for all the classes is that the coefficient :math:`c[i]` goes with the basis function of degree i. -All of the classes have the same methods, and especially they implement the -Python numeric operators +, -, \*, //, %, divmod, \*\*, ==, -and !=. The last two can be a bit problematic due to floating point -roundoff errors. We now give a quick demonstration of the various -operations using NumPy version 1.7.0. +All of the classes are immutable and have the same methods, and +especially they implement the Python numeric operators +, -, \*, //, %, +divmod, \*\*, ==, and !=. The last two can be a bit problematic due to +floating point roundoff errors. We now give a quick demonstration of the +various operations using NumPy version 1.7.0. Basics ------ @@ -187,6 +187,11 @@ Which gives the polynomial `p` in Chebyshev form. This works because the original polynomial. However, all the multiplications and divisions will be done using Chebyshev series, hence the type of the result. +It is intended that all polynomial instances are immutable, therefore +augmented operations (``+=``, ``-=``, etc.) and any other functionality that +would violate the immutablity of a polynomial instance are intentionally +unimplemented. + Calculus -------- |