summaryrefslogtreecommitdiff
path: root/numpy/lib/polynomial.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #4073 from endolith/patch-2Charles Harris2016-06-151-6/+2
|\ | | | | BUG: change real output checking to test if all imaginary parts are zero
| * Simpler checking of complex conjugatesendolith2015-02-171-6/+3
| |
| * BUG: sort after conjugating so that poly() outputs real type for exact ↵endolith2015-01-251-6/+5
| | | | | | | | conjugates
* | DOC: Fix some incorrect RST definition listsEndolith2016-05-111-1/+1
| |
* | DOC: Fix poly_val description for 'x' inputgfyoung2015-12-221-4/+4
| | | | | | | | Closes gh-6849.
* | DOC: Use print only as function when print_function is imported from __future__gfyoung2015-12-191-8/+8
| | | | | | | | Closes gh-6863.
* | add clarification of weights to documentationGriffin Hosseinzadeh2015-11-131-1/+2
|/
* DOC : do not abuse enum markupThomas A Caswell2014-12-121-2/+2
| | | | | | | | | - {ndarray, bool} -> ndarray or bool - {int, array of ints} -> int or array of ints - {str, function} -> str or function - {sequnce, int} -> sequence or int - {array_like, poly1d} -> array_like or poly1d - {None, list of `m` scalars, scalar} -> list of `m` scalars or scalar
* ENH: Cast non-object arrays to float in np.polyjaimefrio2014-09-251-6/+12
| | | | | | Closes #5096. Casts integer arrays to np.double, to prevent integer overflow. Object arrays are left unchanged, to allow use of arbitrary precision objects.
* MAINT: Make numpy/lib/polynomial/polyval a bit faster.Charles Harris2014-09-021-1/+1
| | | | | | | | | Multiplying a numpy_scalar times a numpy_array is much faster than the other way around. This PR switches the order of multiplication in the polyval function resulting in a speedup of about 5x for scalar values of x. Closes #4610.
* STY: Make files in numpy/lib PEP8 compliant.Charles Harris2014-07-311-33/+34
| | | | The rules enforced are the same as those used for scipy.
* MAINT: Comparison deprecation followup fixesSebastian Berg2014-05-041-15/+3
| | | | | | | Makes the identity check `a = np.array([np.nan], dtype=object)` `a == a`, etc. a deprecation/futurewarning instead of just changing it. Also fixes some smaller things.
* DEP: Deprecate that comparisons ignore errors.Sebastian Berg2014-05-041-2/+16
| | | | | | | | | | | | | | | | | | | | This means that for example broadcasting errors get raised. The array_equiv function is changed to explicitely test if broadcasting is possible. It may be nice to do this test differently, but I am not sure if that is possible. Create a FutureWarning for comparisons to None, which should result in areal elementwise (object) comparisons. Slightly adepted a wrong test. Poly changes: Some changes in the polycode was necessary, the one is probably a bug fix, the other needs to be thought over, since len check is not perfect maybe, since it is more liekly to raise raise an error. Closes gh-3759 and gh-1608
* DOC: Link convolve with polymulendolith2014-03-221-0/+2
| | | | Matlab uses `conv` for both convolution and polynomial multiplication. Clarifying that numpy has functions for each.
* DOC: specify that 2d array must be non-empty in np.poly error message.Daniel da Silva2014-03-151-1/+1
| | | | Fixes #2092. Changes message passed to ValueError.
* Merge pull request #3657 from charris/add-hash-method-to-polynomialsCharles Harris2013-09-041-0/+2
|\ | | | | BUG: Set __hash__ = None for non-hashable classes.
| * BUG: Set __hash__ = None for non-hashable classes.Charles Harris2013-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | Because neither poly1d nor the Polynomial package polynomial classes are immutable, hence not reliably hashable, they should signal that by setting __hash__ = None. This also fixes the warning Overriding __eq__ blocks inheritance of __hash__ in 3.x that is given when the command `python2.7 -3 -c"import numpy"` is run.
* | Small correction in the docstring of polyfit. As mentionned in Issue 3640, ↵Matthieu Dartiailh2013-08-251-3/+3
|/ | | | the notes were wrong in the order of the index for p.
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-7/+7
| | | | | | | 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.
* MAINT: Apply 2to3 idioms fixer.Charles Harris2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | The idioms fixer makes the following replacements. 1) int <- bool 2) comparison or identity of types <- isinstance 3) a.sort() <- sorted(a) There were two problems that needed to be dealt with after the application of the fixer. First, the replacement of comparison or identity of types by isinstance was not always correct. The isinstance function returns true for subtypes whereas many of the places where the fixer made a substitution needed to check for exact type equality. Second, the sorted function was applied to arrays, but because it treats them as iterators and constructs a sorted list from the result, that is the wrong thing to do. Closes #3062.
* 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.
* Merge pull request #460 from endolith/regex_formattingCharles Harris2013-04-031-1/+1
|\ | | | | DOC: Formatting fixes using regex
| * DOC: regex-assisted fixes of definition list formattingendolith2013-03-191-1/+1
| |
* | 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-0/+2
| | | | | | | | 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.
* 2to3: Apply `raise` fixes. Closes #3077.Charles Harris2013-03-011-2/+2
| | | | | | | | | | Replaces the raise Exception, msg: form with raise Exception(msg):
* ENH: Add weights and covariance estimate to standard polyfit.Travis E. Oliphant2011-09-131-18/+47
|
* STY: Fix up some remaining old-style exceptions.Charles Harris2011-04-051-2/+2
| | | | I think that is the end of it.
* STY: Update exception style, easy ones.Charles Harris2011-04-051-13/+13
|
* WHT: Cleanup trailing whitespace.Charles Harris2011-04-021-3/+3
|
* DOC: merge more doc wiki edits.rgommers2011-03-021-12/+10
|
* BUG: Make polyder return a poly1d for the zeroeth order derivative whenCharles Harris2010-05-051-8/+9
| | | | the input is a poly1d. Fixes ticket #1249.
* 3K: lib: implement __rtruediv__ for poly1dPauli Virtanen2010-02-211-0/+2
|
* 3K: lib: poly1d __div__ -> __truediv__, and fix its doctestsPauli Virtanen2010-02-211-0/+2
|
* BUG: Check input to poly for zero-dimensional arrays.Stefan van der Walt2010-02-081-2/+2
|
* fixed a whole bunch of doctestsPaul Ivanov2009-12-281-7/+19
|
* Docstring update: libPauli Virtanen2009-10-021-86/+227
|
* All non core regressions tests moved to their respective modules.David Cournapeau2009-09-161-2/+1
|
* Move finfo into core.David Cournapeau2009-09-161-2/+1
|
* Fix formatting of complex coefficients in poly1dPauli Virtanen2009-04-241-7/+17
|
* Fixed #1095: make polyint work well with object arraysPauli Virtanen2009-04-241-4/+3
|
* Merge from the doc wikiPauli Virtanen2009-03-241-1/+1
|
* Fix polyint to work correctly with float, complex, and int inputs.Charles Harris2009-03-091-8/+12
| | | | Fix polydiv to work correctly with float, complex, and int inputs.
* Fix ticket #944.Charles Harris2009-03-091-2/+2
|
* Get lstsq and eigvals from numpy.linalg, not from numpy.dual. Addresses ↵Pauli Virtanen2008-12-131-27/+4
| | | | Scipy ticket #800
* Import documentation from doc wiki (part 2, work-in-progress docstrings, but ↵Pauli Virtanen2008-10-281-10/+113
| | | | they are still an improvement)
* Import documentation from doc wiki (part 1)Pauli Virtanen2008-10-271-1/+2
|
* Merge from documentation editor.Stefan van der Walt2008-08-051-128/+412
|
* Use the implicit "import numpy as np" made available to all doctests instead Alan McIntyre2008-07-051-2/+2
| | | | | of explicit imports or dependency on the local scope where the doctest is defined..
* Reduce numpy's import times by delaying a few time consuming imports to the ↵Robert Kern2008-07-031-7/+1
| | | | point of actual use and global instantiations of finfo. Thanks to David Cournapeau for tracking down and fixing the import part of the problem.