| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 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>
|
|
|
|
| |
wrong dtype
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* replace superfluous single-character regex character
classes with their literal string equivalents; this
avoids the overhead associated with a character class
when there's only a single character enclosed (so there's
no benefit to the class overhead)
* for more information see:
Chapter 6 of:
Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed.,
O’Reilly Media, 2009.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|
|
|
|
| |
Fixes gh-16354. Previously np.poly1d(z).coeffs.dtype would always
be np.float64 for zero array z, regardless of z's dtype.
|
|
|
| |
Fix bug caused by typo and added tests
|
|
|
|
|
| |
Edited the documentation of polyfit.
The scaling factor of the covariance matrix in the description was erroneous, the correct form is chi2/dof.
The code already used this correct scaling, just the description needed to be updated.
|
|
|
|
|
|
| |
Adds a `.. note::` right after the description to all functions/classes
from the numpy.lib.polynomial module notifying the user that the
numpy.polynomial package is preferred.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Increment stacklevel for warnings to account for NEP-18 overrides
For NumPy functions that make use of `__array_function__`, the appropriate the
stack level for warnings should generally be increased by 1 to account for
the override function defined in numpy.core.overrides.
Fixes GH-13329
* Update numpy/lib/type_check.py
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
|
|\ |
|
| |
| |
| |
| | |
2 for polyfit rankwarning, 2 for divide by zero in log10.
|
| |
| |
| |
| | |
These ones just generated warnings, not build failures
|
| |\
| | |
| | | |
BUG: polyval returned non-masked arrays for masked input.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fix will preserve subtypes of ndarray when given as input (x)
to the polyval function. In particular, the results for masked
values of a masked array will be masked.
Fixes #2477.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | |
| | |
| | |
| | | |
disable scaling completely.
|
| | |
| | |
| | |
| | |
| | | |
Change differentiate to integrate in parameter `p` description.
Fixes #12386.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes GH-12271
Tests verify that everything in ``dir(numpy)`` either has ``__module__`` set to
``'numpy'``, or appears in an explicit whitelist of undocumented functions and
exported bulitins. These should eventually be documented or removed.
I also identified a handful of functions for which I had accidentally not setup
dispatch for with ``__array_function__`` before, because they were listed under
"ndarray methods" in ``_add_newdocs.py``. I guess that should be a lesson in
trusting code comments :).
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* ENH: __array_function__ support for np.lib, part 2
xref GH12028
np.lib.npyio through np.lib.ufunclike
* Fix failures in numpy/core/tests/test_overrides.py
* CLN: handle depreaction in dispatchers for np.lib.ufunclike
* CLN: fewer dispatchers in lib.twodim_base
* CLN: fewer dispatchers in lib.shape_base
* CLN: more dispatcher consolidation
* BUG: fix test failure
* Use all method instead of function in assert_equal
* DOC: indicate n is array_like in scimath.logn
* MAINT: updates per review
* MAINT: more conservative changes in assert_array_equal
* MAINT: add back in comment
* MAINT: casting tweaks in assert_array_equal
* MAINT: fixes and tests for assert_array_equal on subclasses
|
| |
| |
| |
| |
| | |
* Remove misleading reference to numpy/polynomial/polynomial/polyfit.
* Add missing period in numpy/polynomial/_polybase.py
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* DOC: reccomend polynomail.Polynomial over np.polyfit
* update from review
* update from review, fix links
* fix from review
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This previously failed with:
TypeError: Cannot cast ufunc subtract output from dtype('complex128') to dtype('float64') with casting rule 'same_kind'
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
| |
Remove the comment suggesting that they are not
|
|
|
|
|
|
|
| |
`poly.coeffs = 1` has always failed with a strong exception guarantee.
However, `poly.coeffs += 1` would both change the state and fail.
Now both fail without affecting the value.
|
|
|
|
| |
Scipy needs `.__dict__['coeffs']` to work, so we can't call the member _coeffs
|
| |
|
|
|
|
|
| |
Presumably written long before @property existed. This means we don't need
__dict__ everywhere
|
|
|
|
| |
Fixes #8760
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
np.roots() does not always return complex roots, the
roots of a polynomial depend its coefficients and
therefore may be in the real or complex domain.
e.g.
```
>>> (np.roots([1,2,3])).dtype
dtype('complex128')
>>> (np.roots([1,2,])).dtype
dtype('float64')
```
|
| |
|
|
|
| |
The first dimension of the return value depends on the degree of the polynomial, not the number of elements being used in the fit.
|
|
|
|
| |
Also a slight refactoring of np.polyfit.
|
|
|
|
|
|
|
|
| |
This should fix the issue discussed at
https://mail.scipy.org/pipermail/numpy-discussion/2013-July/067076.html
Without the ValueError added here, polyfit can (and does) return
negative or nan variances with no warning.
|