summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_polynomial.py
Commit message (Collapse)AuthorAgeFilesLines
* TST: Update the `poly1d.__getitem__` and `__eq__` testsBas van Beek2021-05-281-5/+26
|
* BUG: Respect dtype of all-zero argument to poly1dCameron Blocker2020-10-171-0/+14
| | | | | Fixes gh-16354. Previously np.poly1d(z).coeffs.dtype would always be np.float64 for zero array z, regardless of z's dtype.
* BUG: fix typo in polydiv that prevented promotion to poly1d (#17053)jakobjakobson132020-08-171-0/+9
| | | Fix bug caused by typo and added tests
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-1/+1
| | | | | | | 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-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* Merge branch 'master' into poly1d-fixes-fixes-fixes-fixesEric Wieser2019-04-161-96/+116
|\
| * Removed non-standard scaling of the covariance matrix and added option to ↵Andreas Nussbaumer2018-11-211-10/+40
| | | | | | | | disable scaling completely.
| * MAINT: Convert the doctest in `numpy/lib/tests/test_polynomial.py` to ↵Krzysztof Chomski2018-07-141-82/+68
| | | | | | | | regular tests. (#GH9416).
| * TST: reactivate module docstring tests, fix float formattingmattip2018-04-151-18/+18
| |
| * MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-061-6/+2
| | | | | | | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
| * BUG: Fixed polydiv for Complex Numbers (#10473)Deepak Kumar Gouda2018-01-301-0/+8
| | | | | | | | | | | | This previously failed with: TypeError: Cannot cast ufunc subtract output from dtype('complex128') to dtype('float64') with casting rule 'same_kind'
| * TST: Remove unittest dependencies in numpy/lib/tests.Charles Harris2017-07-241-2/+2
| |
* | BUG: Return the coefficients array directlyEric Wieser2017-07-081-9/+9
|/ | | | | | | Turns out that this was relied upon downstream We also add a setter for coeffs, so that augmented assignment does not both change state and raise an exception suggesting state could not be changed.
* TST: Prove that poly1d coeffs are immutableEric Wieser2017-03-211-0/+14
| | | | Remove the comment suggesting that they are not
* BUG: Prevent crash in poly1d.__eq__Eric Wieser2017-03-091-0/+9
| | | | Fixes #8760
* TST: Test that polyfit raises if not enough data for cov estimate.Charles Harris2016-06-151-1/+7
| | | | Also a slight refactoring of np.polyfit.
* TST: Set seed for deterministic random testEndolith2015-03-081-103/+6
| | | | also fixed some PEP8 issues
* TST: Fix missing imports, undeterministic testendolith2015-01-251-2/+101
| | | | Change to a deterministic test instead of using rand
* TST: Add tests for np.poly()endolith2015-01-251-0/+22
|
* ENH: Cast non-object arrays to float in np.polyjaimefrio2014-09-251-0/+11
| | | | | | Closes #5096. Casts integer arrays to np.double, to prevent integer overflow. Object arrays are left unchanged, to allow use of arbitrary precision objects.
* STY: PEP8 compliance for numpy/lib/tests.Charles Harris2014-07-311-4/+4
| | | | | | | The possibly controversial part of this is making the nested array value lists PEP8 compliant, as there is something to be said aligning the values for clarity. In the end, it seemed like the easiest thing to do was to make them PEP8 compliant. The eye can get used to that.
* MAINT: Fix problems noted by pyflakes in numpy/lib/tests.Charles Harris2014-07-311-1/+4
|
* STY: Make numpy/lib/test/*.py PEP8 compliant.Charles Harris2013-09-031-6/+8
| | | | | | | Run autopep8 over the test files in numpy/lib/test and make fixes to the result. Also remove Python5 workaround.
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-25/+25
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Use absolute imports.Charles Harris2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-2/+4
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* BUG: Fix polynomial tests.Stefan van der Walt2011-09-141-2/+2
|
* ENH: Add weights and covariance estimate to standard polyfit.Travis E. Oliphant2011-09-131-2/+25
|
* STY: Replace assert by assert_ in tests. There remain 124 uses ofCharles Harris2011-04-051-8/+8
| | | | assert in non-testing files that should be checked for correctness.
* TST: update namespace usage in lib.polynomial doctests.rgommers2011-03-011-11/+8
|
* TST: remove a failing doctest for poly1d.rgommers2010-10-171-3/+0
| | | | | | | The failure only occurs on Windows and Python 2.5, there the printing of floating point numbers is slightly different. Since this is a doctest and can not be marked conditionally as knownfail, just removing it is simplest. It's not a bug anyway.
* 3K: lib: poly1d __div__ -> __truediv__, and fix its doctestsPauli Virtanen2010-02-211-7/+7
|
* BUG: Check input to poly for zero-dimensional arrays.Stefan van der Walt2010-02-081-0/+6
|
* Fix formatting of complex coefficients in poly1dPauli Virtanen2009-04-241-0/+9
|
* Fixed #1095: make polyint work well with object arraysPauli Virtanen2009-04-241-0/+23
|
* ran reindentJarrod Millman2008-08-081-2/+1
|
* Restore old test framework classes.Alan McIntyre2008-06-211-1/+2
| | | | | | | | | | | Added numpy.testing.run_module_suite to simplify "if __name__ == '__main__'" boilerplate code in test modules. Removed numpy/testing/pkgtester.py since it just consisted of an import statement after porting SciPy r4424. Allow numpy.*.test() to accept the old keyword arguments (but issue a deprecation warning when old arguments are seen). numpy.*.test() returns a test result object as before. Fixed typo in distutils doc.
* Switched to use nose to run tests. Added test and bench functions to all ↵Alan McIntyre2008-06-171-6/+8
| | | | modules.
* Fix polyfit for 2D case and add test for same. Fixes ticket 697.Charles Harris2008-03-151-0/+15
|
* more janitorial workJarrod Millman2007-12-291-4/+4
|
* Rename test classes to CapWords.Stefan van der Walt2007-10-021-1/+1
|
* Fix string conversion of polynomial when leading coefficients areStefan van der Walt2007-08-061-0/+12
| | | | zero. Closes ticket #564.
* Whitespace cleanup.Stefan van der Walt2007-01-081-1/+1
|
* Add tests for tickets #312, #322, for polynomial roots and for settingStefan van der Walt2006-10-061-0/+4
| | | | elements in object arrays.
* Replace ScipyTestCase with NumpyTestCasecookedm2006-07-171-1/+1
|
* Added NumpyTestCase.rundocs method to support running doc-tests via unittest ↵Pearu Peterson2006-04-261-3/+2
| | | | machinery - needed for running tests via testoob.
* update tests to all run correctlyTim Leslie2006-03-131-0/+2
|
* Moved .dtypedescr to .dtype; .dtype->.dtype.type; .dtypestr ->.dtype.str; ↵Travis Oliphant2006-01-151-2/+0
| | | | .dtypechar -> .dtype.char
* More fixes...Travis Oliphant2006-01-041-2/+2
|