summaryrefslogtreecommitdiff
path: root/numpy/polynomial
Commit message (Collapse)AuthorAgeFilesLines
* TST: Branch coverage improvement for `np.polynomial` (#18499)jbCodeHub2021-02-283-0/+34
| | | | | | | * added tests for vander_nd in test_polyutils to cover some of the missed branches * added tests to polyline and vander to improve branch coverage * added tests to test_legendre.py to improve branch coverage
* DOC: cleanup of numpy/polynomial.Matthias Bussonnier2021-01-284-21/+9
| | | | | 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: Avoid using "set of" when talking about an ordered list.Antony Lee2020-12-291-1/+1
| | | | | | | | | | | | ... or when the input isn't/cannot be a set. I left a few usages, e.g. in random sampling, where "set" is reasonable as informal description of an array as the order doesn't matter; however, for e.g. np.gradient the order of the returned list is clearly important, so "set" is wrong. Also some other minor doc edits noticed during the grepping: using `shape` instead of `form` in `cov` is consistent with most other places; the wording in `Polynomial.trim` now matches other methods on the same class.
* DOC: Update reference to verbatim in a few location.Matthias Bussonnier2020-12-287-7/+7
| | | | | Single backticks default role is reference, while here it seem to be for verbatim. Fix it in a couple of places.
* DOC: Fix a couple of reference to verbatim and vice versaMatthias Bussonnier2020-12-181-3/+3
| | | | | | | | | | | | | | | | This update a coupe of references (single backticks) that actually are not to verbatim/code (double backticks); and a couple of verbatim to reference when they do actually exists and can be resolved in context. I probably missed other; and stayed simple but spoted a few other inconsistencies that I did not fix: - some ``...`` could actually be :math:`...` but not always clear if it would be better. - some intervals are [``...``], other are ``[...]`` I guess they could be discussed individually; it was mostly the failing references that bothered me.
* TST: Fix crosstalk issues with polynomial str tests.Ross Barnowski2020-12-071-5/+8
| | | | | | | | | | | Polynomial printing tests implicitly depended on calling order, causing the test suite to fail when the test ordering was randomized with the pytest-random plugin (gh-17954). Two factors contributed to this: * Improper setting of class-level test config and * Poorly designed test that overrode an inherited class variable.
* BUG: Fixed an issue where `.pyi` weren't picked up by numpy sub-packagesBas van Beek2020-11-031-0/+1
|
* MAINT: Chain exceptions in "_polybase.py" (#17453)Sahil Siddiq2020-10-071-4/+4
| | | * Removed "from" keyword and changed "raise e" to "raise"
* Merge pull request #17250 from albertvillanova/fix-docstringCharles Harris2020-09-106-44/+133
|\ | | | | DOC: Fix docstring cross-referencing
| * Fix docstring cross-referencingAlbert Villanova del Moral2020-09-046-44/+133
| |
* | ENH: Replace module-level `__getattr__` with explicitly defined objectsBas van Beek2020-08-201-2/+7
| |
* | ENH: Add placeholder stubs for all sub-modulesBas van Beek2020-08-191-0/+4
|/
* Merge pull request #16167 from rossbar/doc/poly_module_docstringMatti Picus2020-07-141-0/+101
|\ | | | | DOC: Increase guidance and detail of np.polynomial docstring
| * Update numpy/polynomial/__init__.pyRoss Barnowski2020-07-131-1/+1
| | | | | | Co-authored-by: Melissa Weber Mendonça <melissawm@gmail.com>
| * Fixup rst formatting.Ross Barnowski2020-05-061-28/+26
| |
| * Add categorized listing of conv. class attrs/methods.Ross Barnowski2020-05-061-0/+64
| |
| * WIP: Added blurb about conv. classes to poly pkg docstring.Ross Barnowski2020-05-061-0/+39
| | | | | | | | Emphasize that the class-based interface is preferred.
* | MAINT: Change for loop (range -> for each)marload2020-07-141-3/+2
| |
* | MAINT: Remove nickname from polynomial classes. (gh-16589)Ross Barnowski2020-07-087-11/+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
* | MAINT: Prefer generator expressions over list comprehensionsLukas Geiger2020-06-211-2/+2
| |
* | Merge pull request #16506 from wrzadkow/Polynomial.fit-documentationRoss Barnowski2020-06-101-4/+2
|\ \ | | | | | | DOC: only single-polynomial fitting in np.polynomial.Polynomial.fit()
| * | DOC: add the number of sample points as suggestedWojciech Rzadkowski2020-06-081-1/+1
| | | | | | | | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
| * | DOC: expand the docstring as suggested in reviewWojciech Rzadkowski2020-06-051-1/+1
| | | | | | | | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
| * | DOC: mention only single-polynomial fitting in np.polynomial.Polynomial.fit()Wojciech Rzadkowski2020-06-051-4/+2
| | |
* | | 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
* | Merge pull request #15666 from rossbar/enh/poly_strMatti Picus2020-06-044-23/+463
|\ \ | | | | | | ENH: Improved `__str__` for polynomials
| * | STY: Move comment outside of try/except.Ross Barnowski2020-05-131-3/+3
| | |
| * | Handle TypeError in _generate_str for coefs.Ross Barnowski2020-05-132-7/+54
| | | | | | | | | | | | | | | | | | Add a fallback for TypeErrors that are raised when attempting to compare arbitrary elements (e.g. strings or Python complex) to 0 in _generate_str.
| * | ENH: Improved __str__, __format__ for polynomialsRoss Barnowski2020-05-074-23/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes the printing style of instances of the convenience classes in the polynomial package to a more "human-readable" format. __str__ has been modified and __format__ added to ABCPolyBase, modifying the string representation of polynomial instances, e.g. when printed. __repr__ and the _repr_latex method (which is used in the Jupyter environment are unchanged. Two print formats have been added: 'unicode' and 'ascii'. 'unicode' is the default mode on *nix systems, and uses unicode values for numeric subscripts and superscripts in the polynomial expression. The 'ascii' format is the default on Windows (due to font considerations) and uses Python-style syntax to represent powers, e.g. x**2. The default printing style can be controlled at the package-level with the set_default_printstyle function. The ABCPolyBase.__str__ has also been made to respect the linewidth printoption. Other parameters from the printoptions dictionary are not used. Co-Authored-By: Warren Weckesser <warren.weckesser@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* | | Mark tests as a subpackage rather than data.Hameer Abbasi2020-05-061-1/+1
| |/ |/|
* | DOC: Add missing bracket (gh-16051)Chunlin2020-04-255-16/+16
| | | | | | Add missing closing brackets, script to generate the list in the PR gh-16051.
* | Added some chained exceptionsChris Holland2020-04-231-4/+4
| |
* | MAINT,TST: Move _repr_latex tests to test_printing.Ross Barnowski2020-04-212-50/+49
| | | | | | | | | | | | | | | | | | | | Organizational refactoring - the tests for the polynomial _repr_latex method were originally defined in test_classes.py. Based on the descriptions of the various test files, it is a better fit in test_printing.py. Updated docstring to reflect that _repr_latex is used in Jupyter environments, not IPython terminals (by default).
* | MAINT: simplify code that assumes str/unicode and int/long are different ↵Eric Wieser2020-03-261-2/+1
|/ | | | | types (#15816) Cleanup from the dropping of python 2
* DOC: Refactor `np.polynomial` docs using `automodule` (#15662)Ross Barnowski2020-03-126-220/+306
| | | * DOC: Refactor polynomial docs using automodule.
* Merge pull request #15434 from notanton/maintenance-fstringsCharles Harris2020-01-2610-68/+61
|\ | | | | MAINT: Updated polynomial to use fstrings
| * Updated files in polynomial/ to use fstringsAnton Ritter-Gogerly2020-01-2710-68/+61
| |
* | MAINT: Remove Python2 workaroundsSeth Troisi2020-01-231-4/+0
|/
* MAINT: Clean up, mostly unused imports.Warren Weckesser2020-01-236-7/+0
|
* MAINT: Ragged cleanup (#15085)Matti Picus2020-01-152-10/+10
| | | | | | | | | | | | * TST: refactor sorter tests, use proper ragged array creation syntax * MAINT: code never hit the exception, but would error when iterating * MAINT: pytest.mark.parametrize did not add much, removing (from review) * MAINT: use asanyarray and generalize (from review) Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-0510-67/+67
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-0319-38/+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-147-41/+86
| | | | | | | | 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: Remove redundant deprecation checksEric Wieser2019-08-241-8/+2
| | | | These deprecations already happen inside `vanderf`, so don't need to be repeated here.
* TST: hit the deprecationwarningpatto902019-07-141-1/+3
|
* check also warning messagepatto902019-07-141-2/+3
|
* add missing import warningspatto902019-07-131-0/+1
|
* add test to hit RankWarning in polyutils._fitpatto902019-07-131-2/+12
|
* MAINT: Replace integers in places where booleans are expectedMSeifert042019-07-017-29/+29
|