| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
|
|
|
|
|
|
|
|
| |
Numpy can now be tested using the standard
`python -c"import numpy; numpy.test()"`
construct.
|
|
|
|
|
| |
The "bench" testing with the old bench files is no longer supported.
These days we use `runtests.py` and `asv`.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Found via `codespell`
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
It was not being checked that the `lbnd` and `scl` parameters were
scalars as required.
Closes #9901.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
so it actually displays in the docs
[skip ci]
|
|\
| |
| | |
TST, MAINT: Add `__init__.py` files to tests directories.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Also add a hint to the documentation advising the use of moveaxis over rollaxis.
Tests for rollaxis are left alone.
|
| |
| |
| |
| |
| |
| | |
useful
assert_ is not a substitute for assert_equal
|
|/
|
|
| |
Also, update the docs with this new repr
|
|
|
|
|
|
|
| |
* Rename chebinterp to chebinterpolation as suggested.
* Make some fixes to the Chebyshev class function.
* Refactor TestInterpolation.
* Add test for the Chebyshev.interpolation class function.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
BUG: Only propagate TypeError from where we throw it
|
| | |
|
|\ \
| |/
|/| |
MAINT: Don't internally use the one-argument where
|
| |
| |
| |
| | |
nonzero is a clearer spelling
|
|/
|
|
| |
Bare except is very rarely the right thing
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
- 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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
The strings in error messages were left untouched
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|