-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See: sagemath/sage#37123 Also apply a few minor fixes.
- Loading branch information
Showing
5 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# configuration for sage on void linux | ||
SAGE_SHARE = "/usr/share/sagemath" | ||
GAP_SHARE_DIR = "/usr/share/gap" | ||
JMOL_DIR = "/usr/share/jmol" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py | ||
index dfaafb4353f..8d62ade24c8 100644 | ||
--- a/src/sage/calculus/calculus.py | ||
+++ b/src/sage/calculus/calculus.py | ||
@@ -568,8 +568,8 @@ def symbolic_sum(expression, v, a, b, algorithm='maxima', hold=False): | ||
|
||
An example of this summation with Giac:: | ||
|
||
- sage: symbolic_sum(1/(1+k^2), k, -oo, oo, algorithm='giac') | ||
- (pi*e^(2*pi) - pi*e^(-2*pi))/(e^(2*pi) + e^(-2*pi) - 2) | ||
+ sage: symbolic_sum(1/(1+k^2), k, -oo, oo, algorithm='giac').factor() | ||
+ pi*(e^(2*pi) + 1)/((e^pi + 1)*(e^pi - 1)) | ||
|
||
The same summation is solved by SymPy:: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx | ||
index 5d19067f2ed..97e50fb2616 100644 | ||
--- a/src/sage/matrix/matrix_double_dense.pyx | ||
+++ b/src/sage/matrix/matrix_double_dense.pyx | ||
@@ -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 | ||
diff --git a/src/sage/numerical/optimize.py b/src/sage/numerical/optimize.py | ||
index 708d440a205..9f973c6bd69 100644 | ||
--- a/src/sage/numerical/optimize.py | ||
+++ b/src/sage/numerical/optimize.py | ||
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters