summaryrefslogtreecommitdiff
path: root/numpy/polynomial
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* MAINT: Remove "bench" from testing modules `__init__`s.Charles Harris2018-03-311-1/+0
| | | | | The "bench" testing with the old bench files is no longer supported. These days we use `runtests.py` and `asv`.
* MAINT: Do not use random when testing roots.Charles Harris2018-02-161-3/+3
| | | | | | | | | | | The `check_roots` function in numpy/polynomial/tests/test_classes.py was using random numbers without a seed to generate the random roots to be checked. This made the test sensitive to the random state, with the result that currently two of the roots are close together and fail the test to the default seven digit precision when running on the Mac. The failure is probably due to a combination of library and compiler differences between the Mac and the other platforms tested.. The fix here is to hardwire the test values rather than use random numbers.
* More misc. typosluz.paz2018-01-041-1/+1
| | | Found via `codespell`
* TST: Add tests for `lbnd` and `scl` in polynomial integration.Charles Harris2017-10-266-0/+18
| | | | | | The `lbnd` and `scl` parameters of the various polynomial integration functions are documented to be scalars. Add tests that those parameters are checked and ValueError raised when it is not so.
* MAINT: Add parameter checks to polynomial integration functions.Charles Harris2017-10-266-6/+31
| | | | | | | 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-215-10/+10
|
* TST: update tests to remove unneeded whitespaceAllan Haldane2017-09-251-12/+12
|
* DOC: Add polyutils subpackage to reference documentation [skip ci]Michael Seifert2017-09-231-14/+23
|
* DOC: Fix inline "math" directives [skip ci]Michael Seifert2017-09-126-6/+6
|
* DOC: Add whitespace after "versionadded::" directiveMichael Seifert2017-09-125-43/+43
| | | | | | so it actually displays in the docs [skip ci]
* Merge pull request #9524 from charris/add_init_to_test_directoriesCharles Harris2017-08-121-0/+0
|\ | | | | TST, MAINT: Add `__init__.py` files to tests directories.
| * TST, MAINT: Add `__init__.py` files to tests directories.Charles Harris2017-08-061-0/+0
| | | | | | | | | | | | | | | | This allows pytest to run with duplicate test file names. Note that `python <path-to-test-file>` no longer works with this change, nor will a simple `pytest numpy`, because numpy is imported from the numpy repository. However, `python runtests.py` and `>>> numpy.test()` are still available.
* | MAINT: Use moveaxis instead of rollaxis internally (#9475)Nico Schlömer2017-08-106-30/+30
| | | | | | | | | | Also add a hint to the documentation advising the use of moveaxis over rollaxis. Tests for rollaxis are left alone.
* | BUG/TST: Fix the polynomial.test_printing tests, which never tested anything ↵Eric Wieser2017-08-101-25/+25
| | | | | | | | | | | | useful assert_ is not a substitute for assert_equal
* | ENH: Show domain and window as kwargs in reprEric Wieser2017-08-103-6/+6
|/ | | | Also, update the docs with this new repr
* MAINT: Rename chebinterp to chebinterpolation and add test.Charles Harris2017-07-293-43/+126
| | | | | | | * 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-242-1/+79
| | | | | | | | | 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.
* TST: Remove unittest dependencies in numpy/polynomial/tests.Charles Harris2017-07-248-78/+85
|
* MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-041-1/+1
| | | | | | | | | | | | | | | | | The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.
* Merge pull request #9218 from eric-wieser/polynomial-exceptCharles Harris2017-06-031-11/+5
|\ | | | | BUG: Only propagate TypeError from where we throw it
| * BUG: Only propagate TypeError from where we throw itEric Wieser2017-06-031-11/+5
| |
* | Merge pull request #9214 from eric-wieser/no-one-arg-whereCharles Harris2017-06-031-1/+1
|\ \ | |/ |/| MAINT: Don't internally use the one-argument where
| * MAINT: Don't internally use the one-argument whereEric Wieser2017-06-031-1/+1
| | | | | | | | nonzero is a clearer spelling
* | BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-038-21/+21
|/ | | | Bare except is very rarely the right thing
* ENH: Spelling fixesVille Skyttä2017-05-091-1/+1
|
* ENH: Use `__array_ufunc__ = None` in polynomial convenience classes.Charles Harris2017-04-272-2/+10
| | | | | | | | Add `__array_ufunc__ = None` to ABCPolyBase. This ensures that polynomial convenience classes will not participate in ufuncs and will have priority when combined with an ndarray in a Python binary operator. `__array_priority__` is removed, as it is no longer needed.
* MAINT: Use normalize_axis_index in all python axis checkingEric Wieser2017-02-206-48/+18
| | | | | | | As a result, some exceptions change from ValueError to IndexError This also changes the exception types raised in places where normalize_axis_index is not quite appropriate
* Applied same fix as 1695458be to remaining 5 polynomial typesTom Boyd2017-02-015-5/+5
| | | | | | - Fixes documentation of polynomial types `*vander2d()` methods to give the correct last index of the pseudo-Vandermonde matrix returned expressed in terms of x and y.
* Fixing docstring error in polyvander2dTom Boyd2017-02-011-1/+1
|
* Changing spurious Legendre reference to Chebyshev in chebfit docstring.Danny Hermes2017-01-191-1/+1
|
* DEP: Fix escaped string characters deprecated in Python 3.6.Charles Harris2016-12-146-21/+21
| | | | | | | In Python 3.6 a number of escape sequences that were previously accepted -- for instance "\(" that was translated to "\\(" -- are deprecated. To retain the previous behavior either raw strings must be used or the backslash must be properly escaped itself.
* DOC: change version references from x.y to x.y.zPierre de Buyl2016-09-077-7/+7
|
* DOC: change Numpy to NumPy in dosctrings and commentsPierre de Buyl2016-09-067-7/+7
| | | | The strings in error messages were left untouched
* ENH: Add stacklevel to all (or almost all) our function callsSebastian Berg2016-09-026-6/+6
|
* MAINT: refactor and small fixes to polyvalfromroots.Charles Harris2016-06-122-19/+25
| | | | | | | | | Simplify the logic a bit and make behavior consistent with polyval. Note that this adds a check that the number of dimensions of the array of the evaluation points is less than the number of dimensions of the array of roots when tensor=False. That check is missing from polyval and needs to be added.
* ENH: Add `polyrootval` to numpy.polynomiale-q2016-06-122-2/+149
| | | | | | | | | | | As one can easily encounter when working with high-order signal processing filters, converting a high-order polynomial from its roots to its polynomial coefficients can be quite lossy, leading to inaccuracies in the filter's properties. This PR adds a new function, `polyrootval` - based on `polyval` - that evaluates a polynomial given a list of its roots. The benefit of calculating it this way can be seen at scipy/scipy:6059. Some tests are included, as well.
* DOC: Fix some incorrect RST definition listsEndolith2016-05-111-2/+2
|
* DOC: Minor typo fix, hermefik -> hermefit.Jeremy Tuloup2016-03-141-1/+1
|
* MAINT: Fix typos in docs/comment of `ma` and `polynomial` modules.Dongjoon Hyun2016-02-197-8/+8
|
* MAINT: Refactor polynomial leastsquares fits.Charles Harris2016-01-197-138/+105
| | | | | | | * Rewrite the documentation for `deg`. * Check that the passed degrees are int and raise if not. * Do not accept `deg` arguments that do not convert as 0-D or 1-D. * Sort passed degree terms for repeatability.
* TST: Add tests for check_fit with deg specified as listJonathan Underwood2016-01-181-0/+9
|
* ENH: Allow specification of terms to fit in fit methodJonathan Underwood2016-01-181-2/+8
|
* TST: Add tests for hermefit with deg specified as listJonathan Underwood2016-01-181-0/+31
|
* ENH: Allow specification of terms to fit in hermefitJonathan Underwood2016-01-181-5/+34
| | | | | | | | | | The argument `deg` is enhanced to allow an array_like argument to past which specifies which terms to include in the fit. The returned coef array is exapnded to have entries of 0 for all coefficients which were not included in the fit.
* TST: Add tests for polyfit with deg specified as listJonathan Underwood2016-01-181-0/+27
|
* ENH: Allow specification of terms to fit in polyfitJonathan Underwood2016-01-181-5/+34
| | | | | | | | | | The argument `deg` is enhanced to allow an array_like argument to past which specifies which terms to include in the fit. The returned coef array is exapnded to have entries of 0 for all coefficients which were not included in the fit.
* TST: Add tests for lagfit with deg specified as listJonathan Underwood2016-01-181-0/+16
|