Skip to content
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

Compatibility with scipy 1.12 #37123

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sage/matrix/matrix_double_dense.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ cdef class Matrix_double_dense(Matrix_numpy_dense):
# set cutoff as RDF element
if eps == 'auto':
if scipy is None: import scipy
eps = 2*max(self._nrows, self._ncols)*scipy.finfo(float).eps*sv[0]
eps = 2*max(self._nrows, self._ncols)*numpy.finfo(float).eps*sv[0]
eps = RDF(eps)
# locate non-zero entries
rank = 0
Expand Down
2 changes: 1 addition & 1 deletion src/sage/numerical/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def minimize(func, x0, gradient=None, hessian=None, algorithm="default",
hess = func.hessian()
hess_fast = [ [fast_callable(a, vars=var_names, domain=float) for a in row] for row in hess]
hessian = lambda p: [[a(*p) for a in row] for row in hess_fast]
from scipy import dot
from numpy import dot
hessian_p = lambda p,v: dot(numpy.array(hessian(p)),v)
min = optimize.fmin_ncg(f, [float(_) for _ in x0], fprime=gradient,
fhess=hessian, fhess_p=hessian_p, disp=verbose, **args)
Expand Down
Loading