New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAINT: 1.9.3 backports #17239
MAINT: 1.9.3 backports #17239
Commits on Oct 16, 2022
-
BUG: multivariate_normal returns a pdf for values outside its support…
… when covariance is singular (scipy#5288) Co-authored-by: Matt Haberland <mhaberla@calpoly.edu> Co-authored-by: Tirth Patel <tirthasheshpatel@gmail.com>
-
Bug: setting iprint=0 hides all output from fmin_l_bfgs_b, but it sho…
…uld print convergence info from final iteration. (scipy#13322) * BUG: optimize: fixed 13321 A bug in the way the `iprint` and `disp` arguments were handled made it impossible to run the code with `iprint=0`, since it was overwritten from the `disp` handling. Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
-
BUG: stats: Reformulate loggamma._rvs to handle c << 1. (scipy#13349)
* BUG: stats: Reformulate loggamma._rvs to handle c << 1. Closes scipygh-11094. Several tests in test_morestats.py call loggamma.rvs to generate test data. These tests have hardcoded expected results that depend on the values in the input data. Because the stream of variates generated by loggamma.rvs has changed, those tests will fail if the input data is generated by loggamma.rvs. Instead, the data that was generated by a new function that takes the log of random variates from `stats.gamma.rvs`. Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
-
BUG: fix powell evaluated outside limits (scipy#15363)
* BUG: fix powell evaluated outside limits Co-authored-by: Joseph T. Iosue <jtiosue@gmail.com>
-
BUG: stats.rv_histogram: address issue with non-uniform bins (scipy#1…
…5381) The documentation of `rv_histogram` was ambiguous about what it expected as input when bin sizes vary: counts or density? Adding to the confusion, the default behavior of `rv_histogram` was to assume that the input was a density, whereas the default of `np.histogram` is to produce bin counts. To resolve this, this PR adds a parameter `density` so that the user can specify whether the input is to be treated as counts or probability density. Because the default is different from that of `np.histogram`, this also warns the user to pass `density` explicitly. Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
-
Caused by an OOB access due to uninitialized local variables. Fixes scipy#3691.
-
MAINT: stats.ttest_ind: randomized permutation pvalue should not be z…
…ero (scipy#16460) MAINT: stats.ttest_ind: randomized permutation pvalue should not be zero Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
-
MAINT: fix SHGO extra arguments (scipy#16506)
* Fix bug scipy#14589 where arguments to objective function aren't passed properly Co-authored-by: J. J. Ramsey <jjramsey@pobox.com>
-
-
BUG: fix syevr series segfault by explicitly specifying operator prio…
…rity With numpy 1.22.x f2py, dimension of isuppz in syevr is mistranslated. Avoid this by explicitly specifying operator priority with parenthesis. Fixes scipy#16527
-
-
-
-
-
BUG: eps param no effect fixed (scipy#16630)
Co-authored-by: Pamphile Roy <roy.pamphile@gmail.com>
-
-
BUG: interpolate: use INTPTR_MAX
to guard against /detect the integer overflow Co-authored-by: peterbell10 <peterbell10@live.co.uk>
-
BUG: interpolate/fitpackmodule: use INT_MAX for the overflow threshold
Also cast integers to npy_intp, because cannot use size_t in PyArray_SimpleNew et al (it expects signed integers) Co-authored-by: Matthew Brett <matthew.brett@gmail.com>
-
MAINT: interpolate: remove an obsolete comment in fitpackmodule.c
The file maybe used to be autogenerated, but has since been updated manually many times over by several people on several occasions. The autogeneration script is also long gone, too. For completeness, the original version (or a close approximation to it) is now available at https://github.com/matthew-brett/multipack --- this repository content is from a Waybackmachine archive of Travis Oliphant's website, found by Matthew Brett. The archive was trawled on September 29 2000. (https://web.archive.org/web/20000929143650/http://oliphant.netpedia.net/packages/multipack-0.7.tar.gz) Co-authored-by: Matthew Brett <matthew.brett@gmail.com>
-
BUG: interpolate: improve the logic for catching the overflow
Make sure that the product mx*my is <= min(max NPY_INTP, fortan int) to avoid an overflow on both C and Fortran sides on 32- and 64-bit systems with and without HAVE_ILP64 (which make Fortran ints 32- or 64-bit, too)
-
-
BUG: sparse: Fix indexing sparse matrix with empty index arguments.
When a sparse matrix was indexed with an argument that was effectively empty (e.g. `0:0:2`, `[]`, `[False, False]`), the dtype of the matrix was lost and the result became float64. Closes scipygh-16656.
-
-
MAINT: stats.boltzmann: correct _shape_info typo (scipy#16752)
* MAINT: stats.boltzmann: correct _shape_info typo
-
BUG: interpolate: sanity check x and y in make_interp_spline(x, y, k=…
…0) and k=1 (scipy#16780) Co-authored-by: Jake Bowhay <60778417+j-bowhay@users.noreply.github.com>
-
-
BUG: interpolate: work array sizes for RectSphereBivariateSpline (sci…
…py#16872) Make sure that `nuest` parameter is large enough when `s=0` and `pole_continuity=(True, True)`. This value translates to `iopt(2) = iopt(3) = 1` in the FITPACK routine `spgrid.f`. This routine contains the following comment: c nuest : integer. unchanged on exit. c nvest : integer. unchanged on exit. c on entry, nuest and nvest must specify an upper bound for the c number of knots required in the u- and v-directions respect. c these numbers will also determine the storage space needed by c the routine. nuest >= 8, nvest >= 8. c in most practical situation nuest = mu/2, nvest=mv/2, will c be sufficient. always large enough are nuest=mu+6+iopt(2)+ c iopt(3), nvest = mv+7, the number of knots needed for c interpolation (s=0). Therefore, we set in the f2py wrappers `nuest = mu+6+2`, which is the maximum possible value, since each `iopt` array element is at most one.
-
BUG: linalg: Simplify test_sgesdd_lwork_bug_workaround() (scipy#16965)
The test of the _compute_lwork() work-around for a bug in LAPACK versions older than 3.10.1 is simplified. Instead of calling svd() in a subprocess with a large input array and checking that it doesn't crash Python, we check that the function sgesdd_lwork() returns the correct value. It is the incorrect value that resulted in the Python crash, so this is a simpler test of the same issue.
-
FIX: special: use intended branching for
lamv
implementationChange `lamv` implementation to use intended branching for assignment to variable `cs` and avoid useless assignment to implicitly typed variable `elsecs`. See scipy#17104 See lfortran/lfortran#779 Signed-off-by: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com>
-
BUG: special: Fix two XSLOW test failures. (scipy#17190)
When SCIPY_XSLOW is defined, the tests `test_riemann_zeta` and `test_zetac` (that compare the results of `zeta` and `zetac` to the results computed with `mpmath`) are run with 5000 points, and it turns out that the input value 1 is included in that case. The SciPy functions returns `inf`, but `mpmath.zeta(1)` raises an exception, and that caused the tests to fail. The fix is to wrap the `mpmath` function to return `mpmath.inf` when the input is 1. After fixing that, both tests then failed because some inputs result in a relative error of roughly 2e-13, so I bumped the tolerance up to 5e-13.
-
MAINT: update meson.build to make it work on IBM i system (scipy#17193)
[ci skip] Co-authored-by: GavinZhang <zhanggan@cn.ibm.com> Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
-
BLD: fix issue with incomplete threads dependency handling (scipy#17200)
All could using `#include <thread>` needs to have this `thread_dep` dependency. HiGHS code was missing it, and for `stats/_qmc_cy.pyx` it was incorrectly specified. It's wrong in the distutils build as well, but let's ignore that since it's much harder to change and we'll get rid of that build soon. See scipygh-17193 for the type of compile error this causes. [ci skip]
-
DOC: stats.mode: add versionadded tag and correct order of keepdims d…
…escription (scipy#17204) DOC: stats.mode: add versionadded tag and correct order of keepdims description
-
BLD: fix invalid shebang for build helper script
Shebangs do not work this way, but Meson could usually paper over the differences by noticing that the last element is "python3" and rewiring it to use its own sys.executable. However, this failed on WSL, likely because platform quirks meant the script was directly executable, while simultaneously having a shebang that was a fatal error. Use a standard shebang indicating this script would like to run with some form of python3 (which is exactly what it needs). Fixes scipy#17020
-
-
* fix missing import from cherry-picked patch
Commits on Oct 17, 2022
-
MAINT: Handle numpy's deprecation of accepting out-of-bound integers.
After the change in numpy/numpy#22385, numpy raises a deprecation warning with calls such as np.int8(5000) and np.uint32(-1). This change avoids such calls in the tests.
-