summaryrefslogtreecommitdiff
path: root/numpy/polynomial
Commit message (Collapse)AuthorAgeFilesLines
...
* DOC: fix some more See Also issuesRalf Gommers2019-04-145-10/+5
| | | | These ones just generated warnings, not build failures
* DOC: fix doc formatting issues exposed by numpydoc 0.9.0rc1Ralf Gommers2019-04-146-12/+12
|
* ENH: rotate companion matrix for all polynomial basesTyler Moncur2019-04-086-7/+13
|
* ENH: use rotated companion matrix to reduce errorTyler Moncur2019-04-081-1/+1
|
* Merge pull request #13146 from eric-wieser/poly-powCharles Harris2019-03-177-90/+43
|\ | | | | MAINT: Unify polynomial power functions
| * MAINT: Unify polynomial power functionsEric Wieser2019-03-167-90/+43
| | | | | | | | | | | | These power functions are all the same - the algorithm used does not care about the basis. `polypow` and `chebpow` have some optimizations in their versions, which this maintains
* | Merge branch 'master' into deprecate-float-orderEric Wieser2019-03-161-23/+2
|\ \ | |/ |/|
| * Merge pull request #13130 from eric-wieser/unify-polyfitCharles Harris2019-03-167-450/+94
| |\ | | | | | | MAINT: Unify polynomial fitting functions
| * \ Merge pull request #13128 from eric-wieser/unify-polyaddCharles Harris2019-03-157-114/+39
| |\ \ | | | | | | | | MAINT: Unify polynomial addition and subtraction functions
| * \ \ Merge pull request #13111 from eric-wieser/unify-polydivCharles Harris2019-03-137-96/+58
| |\ \ \ | | | | | | | | | | MAINT: Unify polydiv
| * \ \ \ Merge pull request #13107 from eric-wieser/simplify-val-ndEric Wieser2019-03-127-144/+72
| |\ \ \ \ | | | | | | | | | | | | MAINT: Unify polynomial valnd functions
| * \ \ \ \ Merge pull request #13078 from eric-wieser/simplify-from-rootsCharles Harris2019-03-127-90/+36
| |\ \ \ \ \ | | | | | | | | | | | | | | MAINT: deduplicate fromroots in np.polynomial
| * | | | | | MAINT: Merge duplicate implementations of `hermvander2d` and `hermvander3d` ↵Eric Wieser2019-03-111-23/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions One was missing from gh-13079
* | | | | | | DEP: polynomial: Be stricter about integral argumentsEric Wieser2019-03-1613-132/+111
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behavior for: * The `deg` and `axis` arguments of `<type>der` * The `deg` and `axis` arguments of `<type>int` * The `deg` argument of `<type>gauss` * The `deg` argument of `<type>vander2d` * The `deg` argument of `<type>vander3d` The old behavior was: * Raise `ValueError` if the argument is a float, but not an integral one * Allow a float like `1.0` to mean `1`. This is inconsistent with most other integer-accepting APIs in numpy, which require these to be actual integers, and raise TypeError when they are not. The new behavior is: * Raise `TypeError` if the argument is a float, but not an integral one * Emit a `DeprecationWarning` if a float like `1.0` is passed, continuing to allow it its old meaning.
* | | | | | MAINT: Unify polynomial fitting functionsEric Wieser2019-03-157-450/+94
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These fitting functions are all the same - the algorithm used does not care about the basis. This was done using: * A regex find / replace on all but poly and cheb * A manual diff showing that cheb differed only by whitespace * A manual diff showing that poly differed in `deg.ndim == 1` vs `deg.ndim > 0`. Given that this function only allows `deg.ndim <= 1`, and `ndim >= 0`, these two comparison are equivalent.
* | | | | MAINT: Unify polynomial addition and subtraction functionsEric Wieser2019-03-147-114/+39
| |_|_|/ |/| | | | | | | | | | | These functions are all the same - the algorithm used does not care about the basis.
* | | | MAINT: Unify polynomial division functionsEric Wieser2019-03-127-80/+42
| | | | | | | | | | | | | | | | | | | | | | | | These division functions are all the same - the algorithm used does not care about the basis. Note that while chebdiv and polydiv could be implemented in terms of this function, their current implementations are more optimal and exploit the properties of a multiplication by a basis polynomial.
* | | | MAINT: Adjust variable names for consistencyEric Wieser2019-03-122-16/+16
| |_|/ |/| | | | | | | | | | | This makes the variable names in polydiv and chebdiv match polyutils._div. It also brings the order of the special-casing in line to match.
* | | MAINT: Unify polynomial valnd functionsEric Wieser2019-03-127-144/+72
| |/ |/| | | | | No point writing the same function 12 times, when you can write it once
* | MAINT: Move duplicate implementations of ABCPolyBase._fromroots into polyutilsEric Wieser2019-03-117-90/+36
|/ | | | | | Every implementation is the same right now, other than calling different line / mul functions. Found by LGTM.
* MAINT: Merge duplicate implementations of `*vander2d` and `*vander3d` functionsEric Wieser2019-03-026-119/+59
| | | | | | | Every implementation is the same right now, other than calling a different `*vander` function. Merging these into a single private function taking a callback results in significant deduplication. Found by LGTM.
* MAINT: Fix ABCPolyBase in various waysEric Wieser2019-03-021-31/+46
| | | | | | | | | | | This previously: * Did not indicate the arguments in the abstract methods * Did not actually use the `abc` mechanism at all on python 3 (`__metaclass__` does not work any more) * Used the now-deprecated `@abstractproperty` This didn't cause any runtime problems, but does confuse LGTM, and was using the `abc` module incorrectly. This uses python3-only features of the abc module, so can't be backported.
* Merge pull request #12239 from daten-kieker/polyval_2477Marten van Kerkwijk2019-01-041-1/+14
|\ | | | | BUG: polyval returned non-masked arrays for masked input.
| * BUG: polyval returned Non-Masked Arrays for Masked Input.Joachim Hereth2018-10-211-1/+14
| | | | | | | | | | | | | | | | This fix will preserve subtypes of ndarray when given as input (x) to the polyval function. In particular, the results for masked values of a masked array will be masked. Fixes #2477.
* | TST, DOC: enable refguide_checkTyler Reddy2018-12-147-141/+144
| | | | | | | | | | | | | | | | * ported the refguide_check module from SciPy for usage in NumPy docstring execution/ verification; added the refguide_check run to Azure Mac OS CI * adjusted NumPy docstrings such that refguide_check passes
* | MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* | Use np.full in numpy.polynomialRoman Yurchak2018-10-032-2/+2
|/
* MAINT: remove unused stdlib importsEmil Hessman2018-09-301-1/+0
|
* MAINT: remove surviving, unused, list comprehension (#11843)Jeff2018-09-031-7/+0
| | | | | | This variable is never used, and shows signs of being leftover from a previous implementation. Introduced in gh-11528. Closes gh-11842
* Merge pull request #11850 from jeffyancey/update-polybase-commentCharles Harris2018-08-311-1/+1
|\ | | | | DOC: add comment to remove fn after python 2 support is dropped
| * DOC: closes #11845Jeffrey Yancey2018-08-311-1/+1
| |
* | Merge pull request #11834 from charris/fix-polynomial-grammarCharles Harris2018-08-302-2/+2
|\ \ | | | | | | MAINT, DOC: Replace 'an' by 'a' in some docstrings.
| * | MAINT, DOC: Replace 'an' by 'a' in some docstrings.Charles Harris2018-08-302-2/+2
| | | | | | | | | | | | | | | | | | [ci skip] Small fixes in the polynomial package.
* | | Merge pull request #11818 from jeffyancey/polynomial-testsCharles Harris2018-08-306-0/+66
|\ \ \ | |/ / |/| | TST: add missing tests for all polynomial subclass pow fns.
| * | MAINT: use reduce's defaul param rather than a ternary operatorJeffrey Yancey2018-08-266-6/+6
| | |
| * | TST: add missing tests for all polynomial subclass pow fns.Jeffrey Yancey2018-08-266-0/+66
| |/
* | Merge pull request #11817 from jeffyancey/polynomial-docsCharles Harris2018-08-296-37/+76
|\ \ | | | | | | DOC: add examples and extend existing dos for polynomial subclasses
| * | DOC: add examples and extend exisiting dos for polynomial subclassesJeffrey Yancey2018-08-266-37/+76
| |/
* | DOC: Polybase augmented assignment notes (#11806)Jeff2018-08-261-4/+1
|/ | | | | | | | | | | | | | * 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
* DOC: Small docstring fixes for old polyfit.Charles Harris2018-08-151-1/+1
| | | | | * Remove misleading reference to numpy/polynomial/polynomial/polyfit. * Add missing period in numpy/polynomial/_polybase.py
* DOC: recommend polynomial.Polynomial over np.polyfit (#11733)Matti Picus2018-08-141-1/+3
| | | | | | | | | | * DOC: reccomend polynomail.Polynomial over np.polyfit * update from review * update from review, fix links * fix from review
* Merge pull request #11528 from eric-wieser/polynomial-ipython-latexCharles Harris2018-08-128-2/+156
|\ | | | | ENH: Add support for ipython latex printing to polynomial
| * ENH: Add support for ipython latex printing to polynomialEric Wieser2018-08-128-2/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Choices made, and the alternatives rejected (for no particularly strong reason): 1. Show terms in ascending order, to match their internal representation * alternative: descending, to match convention 2. Shows 0 terms in gray * alternative: omit entirely * alternative: show normally to aid comparison 3. Write each term as `basis(ax + b) * alternative: write as `basis(u) ... where u = ax + b` * alternative: show the normalized polynomial In future it would perhaps make sense to expose these options to the end user
* | DOC: Fixed example code for cheb2poly and poly2cheb (see #11519)Max Aifer2018-07-081-2/+2
|/
* MAINT: Move pytesttester outside of np.testing, to avoid creating ↵Eric Wieser2018-07-021-1/+1
| | | | | | | | unnecessary import dependencies pytesttester is used by every single subpackage, so making it depend on np.testing just creates cyclic dependencies that can lead to circular imports Relates to #11457
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-165-6/+6
|
* MAINT: move matrix tests in core, polynomial to matrixlib.Marten van Kerkwijk2018-04-291-3/+6
|
* TST: Replace yield tests in polynomial/tests/test_classes.Charles Harris2018-04-081-65/+49
|
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-069-46/+2
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Update modules `test` to PytestTester.Charles Harris2018-04-041-2/+3
| | | | | | | | Numpy can now be tested using the standard `python -c"import numpy; numpy.test()"` construct.