[arch-commits] Commit in sagemath-doc/trunk (6 files)
Antonio Rojas
arojas at archlinux.org
Fri Dec 15 23:13:51 UTC 2017
Date: Friday, December 15, 2017 @ 23:13:50
Author: arojas
Revision: 274543
Sync with sagemath package
Added:
sagemath-doc/trunk/pari-stackwarn.patch
sagemath-doc/trunk/sagemath-doc-no-sagenb.patch
sagemath-doc/trunk/sagemath-lrs.patch
sagemath-doc/trunk/sagemath-matplotlib2.patch
sagemath-doc/trunk/sagemath-scipy-1.0.patch
Modified:
sagemath-doc/trunk/PKGBUILD
------------------------------+
PKGBUILD | 33 ++++-
pari-stackwarn.patch | 23 +++
sagemath-doc-no-sagenb.patch | 28 ++++
sagemath-lrs.patch | 22 +++
sagemath-matplotlib2.patch | 253 +++++++++++++++++++++++++++++++++++++++++
sagemath-scipy-1.0.patch | 16 ++
6 files changed, 368 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-12-15 22:33:08 UTC (rev 274542)
+++ PKGBUILD 2017-12-15 23:13:50 UTC (rev 274543)
@@ -4,16 +4,18 @@
pkgbase=sagemath-doc
pkgname=(sagemath-doc sagemath-src)
pkgver=8.1
-pkgrel=1
+pkgrel=2
arch=(any)
url="http://www.sagemath.org"
license=(GPL)
-makedepends=(sagemath sage-notebook python2-pyzmq python2-pillow python2-docutils tachyon
+makedepends=(sage-notebook python2-pyzmq python2-pillow python2-docutils tachyon
python2-jupyter_client python2-pkgconfig cython2 thebe python2-sphinx python2-ipywidgets)
source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
sagemath-env.patch package.patch latte-count.patch jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch
- r-no-readline.patch fes02.patch sagemath-threejs.patch sagemath-detect-igraph.patch
- sagemath-networkx2.patch sagemath-linbox-1.5.patch sagemath-pynac-0.7.14.patch docbuild_main.patch)
+ r-no-readline.patch fes02.patch sagemath-threejs.patch sagemath-detect-igraph.patch pari-stackwarn.patch
+ sagemath-detect-igraph.patch sagemath-networkx2.patch sagemath-linbox-1.5.patch sagemath-pynac-0.7.14.patch
+ sagemath-matplotlib2.patch sagemath-scipy-1.0.patch sagemath-lrs.patch
+ docbuild_main.patch sagemath-doc-no-sagenb.patch)
sha256sums=('a42b55c2c8ac244535dc9b87171b7d4dd7e1d498099518ab253354fbe2eaaa7b'
'6dc9b101310f80381c61c0312a3e5c648771bfe0de2e94ac46fafe7282a3e0ee'
'c41ae665499c6cd775d40bbe178f8786830b0931ee26bf11ee02f7d83bcc8107'
@@ -25,10 +27,16 @@
'7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
'514135b920a43f999571a15e97b41e14f5bed59f65b19643864dc23555a7b830'
'28d7789b8d777922ab8871ca43b6afab751428cae875c0343d3962e6a2030b88'
+ 'bfd2a20a33ab19a8a8b216a77d07f62e809fe1e1879c4f171ce5dca62fd482e9'
+ '28d7789b8d777922ab8871ca43b6afab751428cae875c0343d3962e6a2030b88'
'37c5c1e694a2aca06c0f1c7d99622ff81fd2bc6a51e8745762294889fa4673f6'
'a52d03e04c9d64bb957a1f8dcdae3280ebb9450a7fd76aaf5ae5de5c6f74774f'
'538f7b279d72f4b67edb445d386d267f3f7022c1079031ca7ea06f6ce392c906'
- 'ea5e17bb7a7cb36a22e5e3872fcc2585852bc971c4b139b0b2cd69a36c1b009b')
+ 'b9ab2bb5f381ea425e8763b81b8b3a108a3951c594fb1f37f7df921e7c77e26d'
+ '17397b8e1843b013ef5d2e083369109f0719651edd8ef0c8493cb49e2bc4324a'
+ 'c0f65534a845ba802de6196229159fe67fcc3f72f0cb1ce57d4ae5c9fe10282c'
+ 'ea5e17bb7a7cb36a22e5e3872fcc2585852bc971c4b139b0b2cd69a36c1b009b'
+ '261bdb5c24e67fb34f537e29bdf35af655162de3fea7d05abc72f85a864720fe')
prepare() {
cd sage-$pkgver
@@ -53,10 +61,16 @@
-i src/sage/databases/cremona.py
# fix python-igraph detection
patch -p1 -i ../sagemath-detect-igraph.patch
+# fix lrs detection
+ patch -p1 -i ../sagemath-lrs.patch
# adapt to networkx 2 changes
patch -p1 -i ../sagemath-networkx2.patch
# fix three.js plotting backend
patch -p1 -i ../sagemath-threejs.patch
+# don't show PARI stack size increase warnings during doctesting (Debian)
+ patch -p1 -i ../pari-stackwarn.patch
+# remove deprecated scipy parameters
+ patch -p1 -i ../sagemath-scipy-1.0.patch
# Upstream patches
# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
@@ -65,6 +79,10 @@
patch -p1 -i ../sagemath-linbox-1.5.patch
# fix build with pynac 0.7.14 https://trac.sagemath.org/ticket/24329
patch -p1 -i ../sagemath-pynac-0.7.14.patch
+# port away from deprecated and removed functions in matplotlib 2 https://trac.sagemath.org/ticket/23696
+ patch -p1 -i ../sagemath-matplotlib2.patch
+# drop sage-notebook dependency from sagemath-doc https://trac.sagemath.org/ticket/24250
+ patch -p1 -i ../sagemath-doc-no-sagenb.patch
# fix relative imports
patch -p0 -i ../docbuild_main.patch
@@ -72,6 +90,7 @@
# use python2
sed -e 's|cython %s %s|cython2 %s %s|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
+# use sage_setup imports from sagemath source, but use system sage ones (which include compiled modules)
mkdir -p local-python
ln -sr src/sage_setup local-python
}
@@ -85,13 +104,13 @@
export SAGE_DOC_SRC="$SAGE_SRC"/doc
export SAGE_DOC="$SAGE_SRC"/doc
export SAGE_DOC_MATHJAX=yes
- export PYTHONPATH="/usr/lib/sage/site-packages:$srcdir/sage-$pkgver/local-python"
+ export PYTHONPATH="$srcdir"/sage-$pkgver/local-python
python2 sage_setup/docbuild --no-pdf-links -k all html
}
package_sagemath-doc() {
pkgdesc="HTML documentation and inline help for SageMath"
- depends=(sage-notebook python2-sphinx gap-doc thebe)
+ depends=(python2-sphinx gap-doc thebe)
conflicts=(sage-mathematics-doc)
replaces=(sage-mathematics-doc)
Added: pari-stackwarn.patch
===================================================================
--- pari-stackwarn.patch (rev 0)
+++ pari-stackwarn.patch 2017-12-15 23:13:50 UTC (rev 274543)
@@ -0,0 +1,23 @@
+Description: Ignore warnings of PARI increasing the stack size when parsing doctests
+ Since we can't patch PARI to not produce the warnings and we don't want to
+ patch tons of doctests to expect the warnings, we patch the doctest parser
+ to ignore them.
+Author: Tobias Hansen <thansen at debian.org>
+--- sage/src/sage/doctest/parsing.py
++++ sage/src/sage/doctest/parsing.py
+@@ -39,6 +39,7 @@
+
+ float_regex = re.compile('\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)')
+ optional_regex = re.compile(r'(long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w)*))')
++pari_stack_warning_regex = re.compile(r'\s*\*\*\*.*(Warning: increasing stack size to )\d+\.')
+ find_sage_prompt = re.compile(r"^(\s*)sage: ", re.M)
+ find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M)
+ random_marker = re.compile('.*random', re.I)
+@@ -879,6 +880,7 @@
+ 'you'
+ """
+ got = self.human_readable_escape_sequences(got)
++ got = pari_stack_warning_regex.sub('', got)
+ if isinstance(want, MarkedOutput):
+ if want.random:
+ return True
Added: sagemath-doc-no-sagenb.patch
===================================================================
--- sagemath-doc-no-sagenb.patch (rev 0)
+++ sagemath-doc-no-sagenb.patch 2017-12-15 23:13:50 UTC (rev 274543)
@@ -0,0 +1,28 @@
+diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py
+index 2e115fa..c4dfbf5 100644
+--- a/src/doc/common/conf.py
++++ b/src/doc/common/conf.py
+@@ -1,5 +1,5 @@
+ import sys, os, sphinx
+-from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC, THEBE_DIR
++from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC, THEBE_DIR, SAGE_SHARE
+ from datetime import date
+ from six import iteritems
+
+@@ -219,14 +219,12 @@ if (os.environ.get('SAGE_DOC_MATHJAX', 'no') != 'no'
+ from sage.misc.latex_macros import sage_mathjax_macros
+ html_theme_options['mathjax_macros'] = sage_mathjax_macros()
+
+- from pkg_resources import Requirement, working_set
+- sagenb_path = working_set.find(Requirement.parse('sagenb')).location
+- mathjax_relative = os.path.join('sagenb','data','mathjax')
++ mathjax_relative = 'mathjax'
+
+ # It would be really nice if sphinx would copy the entire mathjax directory,
+ # (so we could have a _static/mathjax directory), rather than the contents of the directory
+
+- mathjax_static = os.path.join(sagenb_path, mathjax_relative)
++ mathjax_static = os.path.join(SAGE_SHARE, mathjax_relative)
+ html_static_path.append(mathjax_static)
+ exclude_patterns += ['**/'+os.path.join(mathjax_relative, i)
+ for i in ('docs', 'README*', 'test',
Added: sagemath-lrs.patch
===================================================================
--- sagemath-lrs.patch (rev 0)
+++ sagemath-lrs.patch 2017-12-15 23:13:50 UTC (rev 274543)
@@ -0,0 +1,22 @@
+diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py
+index 2115de6800..da94aa5d45 100644
+--- a/src/sage/game_theory/normal_form_game.py
++++ b/src/sage/game_theory/normal_form_game.py
+@@ -621,6 +621,7 @@ from sage.matrix.constructor import vector
+ from sage.misc.package import is_package_installed, PackageNotFoundError
+ from sage.misc.temporary_file import tmp_filename
+ from sage.numerical.mip import MixedIntegerLinearProgram
++import os
+
+ try:
+ from gambit import Game
+@@ -1636,7 +1637,7 @@ class NormalFormGame(SageObject, MutableMapping):
+ if not algorithm:
+ if self.is_constant_sum():
+ algorithm = "lp"
+- elif is_package_installed('lrslib'):
++ elif os.path.exists('/usr/bin/lrsnash'):
+ algorithm = "lrs"
+ else:
+ algorithm = "enumeration"
+
Added: sagemath-matplotlib2.patch
===================================================================
--- sagemath-matplotlib2.patch (rev 0)
+++ sagemath-matplotlib2.patch 2017-12-15 23:13:50 UTC (rev 274543)
@@ -0,0 +1,253 @@
+diff --git a/src/sage/all.py b/src/sage/all.py
+index 300f519..19bc8ec 100644
+--- a/src/sage/all.py
++++ b/src/sage/all.py
+@@ -313,8 +313,6 @@ warnings.filters.remove(('ignore', None, DeprecationWarning, None, 0))
+ # Ignore all deprecations from IPython etc.
+ warnings.filterwarnings('ignore',
+ module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic)')
+-# Ignore warnings due to matplotlib-1.5 together with numpy-1.13
+-warnings.filterwarnings('ignore', module='matplotlib[.]contour|numpy[.]ma[.]core')
+ # However, be sure to keep OUR deprecation warnings
+ warnings.filterwarnings('default',
+ '[\s\S]*See http://trac.sagemath.org/[0-9]* for details.')
+diff --git a/src/sage/plot/arrow.py b/src/sage/plot/arrow.py
+index 98d6224..fbce029 100644
+--- a/src/sage/plot/arrow.py
++++ b/src/sage/plot/arrow.py
+@@ -147,8 +147,8 @@ class CurveArrow(GraphicPrimitive):
+ bpath = Path(self.vertices, self.codes)
+ p = FancyArrowPatch(path=bpath,
+ lw=width, arrowstyle='%s,head_width=%s,head_length=%s' % (style, head_width, head_length),
+- fc=color, ec=color)
+- p.set_linestyle(get_matplotlib_linestyle(options['linestyle'], return_type='long'))
++ fc=color, ec=color,
++ linestyle=get_matplotlib_linestyle(options['linestyle'], return_type='long'))
+ p.set_zorder(options['zorder'])
+ p.set_label(options['legend_label'])
+ subplot.add_patch(p)
+@@ -336,7 +336,7 @@ class Arrow(GraphicPrimitive):
+ this into account. See :trac:`12836`::
+
+ sage: fig = Graphics().matplotlib()
+- sage: sp = fig.add_subplot(1,1,1)
++ sage: sp = fig.add_subplot(1,1,1, label='axis1')
+ sage: a = arrow((0,0), (1,1))
+ sage: b = arrow((0,0), (1,1), width=20)
+ sage: p1 = a[0]._render_on_subplot(sp)
+@@ -358,7 +358,7 @@ class Arrow(GraphicPrimitive):
+ sage: a.save(filename=filename)
+ sage: with open(filename, 'r') as f:
+ ....: contents = f.read().replace('\n', ' ')
+- sage: two_stroke_pattern = r'setdash.*stroke.*stroke.*setdash'
++ sage: two_stroke_pattern = r'setdash.*setdash.*stroke.*stroke.*setdash'
+ sage: import re
+ sage: two_stroke_re = re.compile(two_stroke_pattern)
+ sage: two_stroke_re.search(contents) is None
+@@ -383,8 +383,8 @@ class Arrow(GraphicPrimitive):
+ lw=width,
+ arrowstyle='%s,head_width=%s,head_length=%s' % (style, head_width, head_length),
+ shrinkA=arrowshorten_end, shrinkB=arrowshorten_end,
+- fc=color, ec=color)
+- p.set_linestyle(get_matplotlib_linestyle(options['linestyle'], return_type='long'))
++ fc=color, ec=color,
++ linestyle=get_matplotlib_linestyle(options['linestyle'], return_type='long'))
+ p.set_zorder(options['zorder'])
+ p.set_label(options['legend_label'])
+
+@@ -437,7 +437,7 @@ class Arrow(GraphicPrimitive):
+ pe1.draw_path(renderer, gc, tpath, affine, rgbFace)
+
+ pe1 = ConditionalStroke(CheckNthSubPath(p, 0), [pe.Stroke()])
+- pe2 = ConditionalStroke(CheckNthSubPath(p, 1), [pe.Stroke(linestyle="solid")])
++ pe2 = ConditionalStroke(CheckNthSubPath(p, 1), [pe.Stroke(dashes={'dash_offset': 0, 'dash_list': None})])
+ p.set_path_effects([pe1, pe2])
+
+ subplot.add_patch(p)
+diff --git a/src/sage/plot/contour_plot.py b/src/sage/plot/contour_plot.py
+index 76077e3..efc1f2b 100644
+--- a/src/sage/plot/contour_plot.py
++++ b/src/sage/plot/contour_plot.py
+@@ -178,12 +178,10 @@ class ContourPlot(GraphicPrimitive):
+ if fill:
+ if contours is None:
+ CSF = subplot.contourf(self.xy_data_array, cmap=cmap,
+- extent=(x0, x1, y0, y1),
+- label=options['legend_label'])
++ extent=(x0, x1, y0, y1))
+ else:
+ CSF = subplot.contourf(self.xy_data_array, contours, cmap=cmap,
+- extent=(x0, x1, y0, y1), extend='both',
+- label=options['legend_label'])
++ extent=(x0, x1, y0, y1), extend='both')
+
+ linewidths = options.get('linewidths', None)
+ if isinstance(linewidths, (int, Integer)):
+@@ -200,13 +198,11 @@ class ContourPlot(GraphicPrimitive):
+ if contours is None:
+ CS = subplot.contour(self.xy_data_array, cmap=cmap,
+ extent=(x0, x1, y0, y1),
+- linewidths=linewidths, linestyles=linestyles,
+- label=options['legend_label'])
++ linewidths=linewidths, linestyles=linestyles)
+ else:
+ CS = subplot.contour(self.xy_data_array, contours, cmap=cmap,
+ extent=(x0, x1, y0, y1),
+- linewidths=linewidths, linestyles=linestyles,
+- label=options['legend_label'])
++ linewidths=linewidths, linestyles=linestyles)
+ if options.get('labels', False):
+ label_options = options['label_options']
+ label_options['fontsize'] = int(label_options['fontsize'])
+diff --git a/src/sage/plot/plot.py b/src/sage/plot/plot.py
+index aa82eda..03a0f3a 100644
+--- a/src/sage/plot/plot.py
++++ b/src/sage/plot/plot.py
+@@ -478,7 +478,7 @@ We test that ``imshow`` works as well, verifying that
+
+ ::
+
+- sage: plt.imshow([[(0,0,0)]])
++ sage: plt.imshow([[(0.0,0.0,0.0)]])
+ <matplotlib.image.AxesImage object at ...>
+ sage: plt.savefig(os.path.join(SAGE_TMP, 'foo.png'))
+
+@@ -2908,11 +2908,14 @@ def list_plot(data, plotjoined=False, **kwargs):
+ If ``plotjoined`` is ``False`` then the axis that is in log scale
+ must have all points strictly positive. For instance, the following
+ plot will show no points in the figure since the points in the
+- horizontal axis starts from `(0,1)`.
++ horizontal axis starts from `(0,1)`. Further, matplotlib will display
++ a user warning.
+
+ ::
+
+ sage: list_plot(yl, scale='loglog') # both axes are log
++ doctest:warning
++ ...
+ Graphics object consisting of 1 graphics primitive
+
+ Instead this will work. We drop the point `(0,1)`.::
+@@ -3288,12 +3291,15 @@ def list_plot_semilogy(data, plotjoined=False, **kwds):
+
+ If ``plotjoined`` is ``False`` then the vertical axis must have all
+ points strictly positive. Otherwise the plot will come up empty.
+- For instance the following plot contains a point at `(1,0)`.
++ For instance the following plot contains a point at `(1,0)`. Further,
++ matplotlib will display a user warning.
+
+ ::
+
+ sage: xl = [2**k for k in range(12)]; yl = range(len(xl))
+ sage: list_plot_semilogy(list(zip(xl,yl))) # plot empty due to (1,0)
++ doctest:warning
++ ...
+ Graphics object consisting of 1 graphics primitive
+
+ We remove `(1,0)` to fix this.::
+diff --git a/src/sage/plot/plot3d/list_plot3d.py b/src/sage/plot/plot3d/list_plot3d.py
+index c9f22dd..be87ff2 100644
+--- a/src/sage/plot/plot3d/list_plot3d.py
++++ b/src/sage/plot/plot3d/list_plot3d.py
+@@ -29,21 +29,20 @@ def list_plot3d(v, interpolation_type='default', texture="automatic", point_list
+
+ OPTIONAL KEYWORDS:
+
+- - ``interpolation_type`` - 'linear', 'nn' (natural neighbor), 'spline'
++ - ``interpolation_type`` - 'linear', 'clough' (CloughTocher2D), 'spline'
+
+ 'linear' will perform linear interpolation
+
+- The option 'nn' An interpolation method for multivariate data in a
+- Delaunay triangulation. The value for an interpolation point is
+- estimated using weighted values of the closest surrounding points in
+- the triangulation. These points, the natural neighbors, are the ones
+- the interpolation point would connect to if inserted into the
+- triangulation.
++ The option 'clough' will interpolate by using a piecewise cubic interpolating
++ Bezier polynomial on each triangle, using a Clough-Tocher scheme.
++ The interpolant is guaranteed to be continuously differentiable.
++ The gradients of the interpolant are chosen so that the curvature of the
++ interpolating surface is approximatively minimized.
+
+ The option 'spline' interpolates using a bivariate B-spline.
+
+ When v is a matrix the default is to use linear interpolation, when
+- v is a list of points the default is nearest neighbor.
++ v is a list of points the default is 'clough'.
+
+ - ``degree`` - an integer between 1 and 5, controls the degree of spline
+ used for spline interpolation. For data that is highly oscillatory
+@@ -320,18 +319,18 @@ def list_plot3d_tuples(v, interpolation_type, texture, **kwds):
+
+ OPTIONAL KEYWORDS:
+
+- - ``interpolation_type`` - 'linear', 'nn' (natural neighbor), 'spline'
++ - ``interpolation_type`` - 'linear', 'clough' (CloughTocher2D), 'spline'
+
+ 'linear' will perform linear interpolation
+
+- The option 'nn' will interpolate by using natural neighbors. The
+- value for an interpolation point is estimated using weighted values
+- of the closest surrounding points in the triangulation.
++ The option 'clough' will interpolate by using a piecewise cubic interpolating
++ Bezier polynomial on each triangle, using a Clough-Tocher scheme.
++ The interpolant is guaranteed to be continuously differentiable.
+
+ The option 'spline' interpolates using a bivariate B-spline.
+
+ When v is a matrix the default is to use linear interpolation, when
+- v is a list of points the default is nearest neighbor.
++ v is a list of points the default is 'clough'.
+
+ - ``degree`` - an integer between 1 and 5, controls the degree of spline
+ used for spline interpolation. For data that is highly oscillatory
+@@ -373,7 +372,7 @@ def list_plot3d_tuples(v, interpolation_type, texture, **kwds):
+ sage: list_plot3d([(1, 2, 3), (0, 1, 3), (2, 1, 4), (1, 0, -2)], texture='yellow', num_points=50)
+ Graphics3d Object
+ """
+- from matplotlib import tri, delaunay
++ from matplotlib import tri
+ import numpy
+ import scipy
+ from random import random
+@@ -439,19 +438,15 @@ def list_plot3d_tuples(v, interpolation_type, texture, **kwds):
+ G._set_extra_kwds(kwds)
+ return G
+
+- if interpolation_type == 'nn' or interpolation_type =='default':
++ if interpolation_type == 'clough' or interpolation_type =='default':
+
+- T=delaunay.Triangulation(x,y)
+- f=T.nn_interpolator(z)
+- f.default_value=0.0
+- j=numpy.complex(0,1)
+- vals=f[ymin:ymax:j*num_points,xmin:xmax:j*num_points]
++ points=[[x[i],y[i]] for i in range(len(x))]
++ j = numpy.complex(0, 1)
++ f = interpolate.CloughTocher2DInterpolator(points,z)
+ from .parametric_surface import ParametricSurface
+- def g(x,y):
+- i=round( (x-xmin)/(xmax-xmin)*(num_points-1) )
+- j=round( (y-ymin)/(ymax-ymin)*(num_points-1) )
+- z=vals[int(j),int(i)]
+- return (x,y,z)
++ def g(x, y):
++ z = f([x, y])
++ return (x, y, z)
+ G = ParametricSurface(g, (list(numpy.r_[xmin:xmax:num_points*j]), list(numpy.r_[ymin:ymax:num_points*j])), texture=texture, **kwds)
+ G._set_extra_kwds(kwds)
+ return G
+diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx
+index 3ce4642..f66cd89 100644
+--- a/src/sage/probability/probability_distribution.pyx
++++ b/src/sage/probability/probability_distribution.pyx
+@@ -118,7 +118,7 @@ cdef class ProbabilityDistribution:
+ sage: P = [0.3, 0.4, 0.3]
+ sage: X = GeneralDiscreteDistribution(P)
+ sage: h, b = X.generate_histogram_data(bins = 10)
+- sage: h
++ sage: h # rel tol 1e-08
+ [1.6299999999999999,
+ 0.0,
+ 0.0,
Added: sagemath-scipy-1.0.patch
===================================================================
--- sagemath-scipy-1.0.patch (rev 0)
+++ sagemath-scipy-1.0.patch 2017-12-15 23:13:50 UTC (rev 274543)
@@ -0,0 +1,16 @@
+diff --git a/src/sage/numerical/optimize.py b/src/sage/numerical/optimize.py
+index 17b5ebb84b..7ce9055cba 100644
+--- a/src/sage/numerical/optimize.py
++++ b/src/sage/numerical/optimize.py
+@@ -486,9 +486,9 @@ def minimize_constrained(func,cons,x0,gradient=None,algorithm='default', **args)
+ else:
+ min = optimize.fmin_tnc(f, x0, approx_grad=True, bounds=cons, messages=0, **args)[0]
+ elif isinstance(cons[0], function_type) or isinstance(cons[0], Expression):
+- min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args)
++ min = optimize.fmin_cobyla(f, x0, cons, **args)
+ elif isinstance(cons, function_type) or isinstance(cons, Expression):
+- min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args)
++ min = optimize.fmin_cobyla(f, x0, cons, **args)
+ return vector(RDF, min)
+
+
More information about the arch-commits
mailing list