summaryrefslogtreecommitdiff
path: root/numpy/polynomial/chebyshev.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC: Add symbol in docstring for classes derived from ABCPolyBasePaul Romano2023-05-101-0/+6
| | | | | A 'symbol' argument was added in ABCPolyBase in 1.24 and documented there, but the docstrings for derived classes (e.g., Polynomial) were not updated.
* DOC: Revert formula change, add note about order.Ross Barnowski2022-09-271-1/+2
| | | | Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
* DOC: Change in the documentation for chebpts2 methodShashank Gupta2022-09-161-1/+1
|
* MAINT, DOC: discard repeated wordsDimitri Papadopoulos2022-01-131-1/+1
|
* DOC: Do not leave space between directive name and double colon.Matthias Bussonnier2021-11-031-2/+2
| | | | | | | | | | | From my regular expression foo, those are the only 9 case whereas there are about ~2000 usage that do not have spaces. While this is ok with docutils/sphinx, it does not seem to be documented, and that means that other parsers will see that as comments, leading to for example improper syntax highlighting. This make it also a tiny bit harder to develop alternative rst parsers.
* Merge pull request #19905 from Samyak2/polynomial-fit-doc-formattingCharles Harris2021-09-211-6/+6
|\ | | | | DOC: fix docstring formatting of polynomial fit method return values.
| * DOC: fix formatting of a return value of polynomial fit methodsSamyak S Sarnayak2021-09-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #19897 The 2nd return value of the following methods/functions were badly formatted and the list was all appearing in a single line. Changed them to separate points which are rendered nicely. - numpy.polyfit - numpy.ma.polyfit - numpy.polynomial.polynomial.polyfit - numpy.polynomial.polynomial.Polynomial.fit - numpy.polynomial.chebyshev.chebfit - numpy.polynomial.chebyshev.Chebyshev.fit - numpy.polynomial.hermite.hermfit - numpy.polynomial.hermite.Hermite.fit - numpy.polynomial.hermite_e.hermefit - numpy.polynomial.hermite_e.HermiteE.fit - numpy.polynomial.laguerre.lagfit - numpy.polynomial.laguerre.Laguerre.fit - numpy.polynomial.legendre.legfit - numpy.polynomial.legendre.Legendre.fit Also fixed erroneous links to `numpy.full` which were actually referring to the `full` argument. Changed those to code strings (double backticks) from single backticks. Also fixed formatting issues in the 3rd return value of numpy.polyfit (and hence also numpy.ma.polyfit).
* | DOC: Typos found by codespellDimitri Papadopoulos2021-09-211-4/+4
|/
* DOC: Adjust polyfit doc to clarify the meaning of w (#18421)Mike Jarvis2021-06-081-4/+5
| | | | | | | | | | | | | | | | | * DOC: Adjust polyfit doc to clarify the meaning of w cov='unscaled', in particular, had inconsistently referred to a weight of 1/sigma**2, while the doc for w says it should be equal to 1/sigma. This change clarifies w to comport with more typical meanings of weights in weighted least squares, and makes clear that cov='unscaled' is appropriate when the weight w**2 = 1/sigma**2. See Issue #5261 for more discussion of the errors/confusion in the previous doc string. * Update doc text for w in all polynomial module fit functions Co-authored-by: Stefan van der Walt <sjvdwalt@gmail.com> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* DOC: cleanup of numpy/polynomial.Matthias Bussonnier2021-01-281-3/+0
| | | | | Numpydoc format says that the colon need o be omitted if there is no type, there were also some empty Examples Sections
* Use sinus based formula for `chebpts1`Weh Andreas2021-01-141-2/+2
|
* DOC: Update reference to verbatim in a few location.Matthias Bussonnier2020-12-281-1/+1
| | | | | Single backticks default role is reference, while here it seem to be for verbatim. Fix it in a couple of places.
* Fix docstring cross-referencingAlbert Villanova del Moral2020-09-041-9/+23
|
* MAINT: Remove nickname from polynomial classes. (gh-16589)Ross Barnowski2020-07-081-1/+0
| | | | | | | | | | | | | | | | * MAINT: Remove nickname from polynomial classes. The convenience classes derived from ABCPolyBase had a nickname attribute that was only used internally in the previous implementation of __str__. After the overhaul of __str__ in #15666, this attr is no longer used. * DOC: Add release note. Add release note to notify users of removal of the abstract property, and highlight users that may be affected by the change. * DOC: fixed rST in release note
* DOC: Fixes for 18 broken links (#16472)bjnath2020-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DOC: Fixes for 18 broken links This, with PR #16465, should fix nearly all the remaining broken links on the site. 4 or 5 others should be easy to fix and just need attention from someone more knowledgeable -- will open an issue. For release notes with dead links, I could usually find links on archive.org for roughly contemporary versions. * DOC: Update to "Fixes for 18 broken links #16472" * Obsolete links, previously commented out, now deleted: https://github.com/numpy/numpy/pull/16472#discussion_r433928958 * Semantic markup for reference to Python class: https://github.com/numpy/numpy/pull/16472#discussion_r433553928 * Missing :ref: in internal link: https://github.com/numpy/numpy/pull/16472#discussion_r433554484 Not included: Resolution on using external/internal doc link in .py: https://github.com/numpy/numpy/pull/16472#discussion_r433554824 * DOC: Add internal link for 'Fixes for 18 broken links' PR #16472 Making reference [1] an internal link in function_base.py => numpy.vectorize.html * DOC: Redirect 2 link fixes in PR #16472 * governance.rst link reverted * ununcs.rst `overridden` link goes where it was meant to per https://github.com/numpy/numpy/pull/16472#pullrequestreview-424666070
* DOC: Add missing bracket (gh-16051)Chunlin2020-04-251-2/+2
| | | Add missing closing brackets, script to generate the list in the PR gh-16051.
* DOC: Refactor `np.polynomial` docs using `automodule` (#15662)Ross Barnowski2020-03-121-40/+60
| | | * DOC: Refactor polynomial docs using automodule.
* MAINT: Clean up, mostly unused imports.Warren Weckesser2020-01-231-2/+0
|
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* MAINT: polynomial: Add an N-d vander implementation used under the hood of ↵Eric Wieser2019-09-141-2/+2
| | | | | | | | the vander2d and vander3d functions The generalization is not exposed in the public API yet, but it could be if the need arises. The shape / dtype conversion logic is left as is for now, even if it might be broken.
* MAINT: Replace integers in places where booleans are expectedMSeifert042019-07-011-4/+4
|
* DOC: fix some more See Also issuesRalf Gommers2019-04-141-2/+1
| | | | These ones just generated warnings, not build failures
* DOC: fix doc formatting issues exposed by numpydoc 0.9.0rc1Ralf Gommers2019-04-141-2/+2
|
* ENH: rotate companion matrix for all polynomial basesTyler Moncur2019-04-081-1/+2
|
* MAINT: Unify polynomial power functionsEric Wieser2019-03-161-0/+3
| | | | | | 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
* DEP: polynomial: Be stricter about integral argumentsEric Wieser2019-03-161-18/+8
| | | | | | | | | | | | | | | | | | | 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-151-75/+1
| | | | | | | | | | 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-141-19/+2
| | | | These functions are all the same - the algorithm used does not care about the basis.
* MAINT: Unify polynomial division functionsEric Wieser2019-03-121-0/+1
| | | | | | 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-121-9/+9
| | | | | 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-121-24/+4
| | | | 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-111-15/+1
| | | | | | 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-021-23/+2
| | | | | | | 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.
* TST, DOC: enable refguide_checkTyler Reddy2018-12-141-19/+19
| | | | | | | | * 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
* MAINT: remove unused stdlib importsEmil Hessman2018-09-301-1/+0
|
* DOC: add examples and extend exisiting dos for polynomial subclassesJeffrey Yancey2018-08-261-6/+16
|
* Merge pull request #11528 from eric-wieser/polynomial-ipython-latexCharles Harris2018-08-121-0/+1
|\ | | | | ENH: Add support for ipython latex printing to polynomial
| * ENH: Add support for ipython latex printing to polynomialEric Wieser2018-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|/
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-161-2/+2
|
* MAINT: Add parameter checks to polynomial integration functions.Charles Harris2017-10-261-1/+5
| | | | | | | It was not being checked that the `lbnd` and `scl` parameters were scalars as required. Closes #9901.
* DOC: Fix incorrect comments that claim 0d arrays failEric Wieser2017-10-211-2/+2
|
* DOC: Fix inline "math" directives [skip ci]Michael Seifert2017-09-121-1/+1
|
* DOC: Add whitespace after "versionadded::" directiveMichael Seifert2017-09-121-7/+7
| | | | | | so it actually displays in the docs [skip ci]
* MAINT: Use moveaxis instead of rollaxis internally (#9475)Nico Schlömer2017-08-101-5/+5
| | | | | Also add a hint to the documentation advising the use of moveaxis over rollaxis. Tests for rollaxis are left alone.
* ENH: Show domain and window as kwargs in reprEric Wieser2017-08-101-2/+2
| | | | Also, update the docs with this new repr
* MAINT: Rename chebinterp to chebinterpolation and add test.Charles Harris2017-07-291-32/+85
| | | | | | | * Rename chebinterp to chebinterpolation as suggested. * Make some fixes to the Chebyshev class function. * Refactor TestInterpolation. * Add test for the Chebyshev.interpolation class function.
* ENH: Add np.polynomial.chebyshev.chebinterp functionLukas Mericle2017-07-241-1/+59
| | | | | | | | | The chebinterp function interpolates a function at the Chebyshev points of the first kind using a Chebyshev series. The resulting interpolation approximates a polynomial fit minimizing the L_inf norm. This function is useful e.g. for estimating roots before running a root-finding function.
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-2/+2
| | | | Bare except is very rarely the right thing