Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP1:Update
python-lmfit
lmfit-scipy.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lmfit-scipy.patch of Package python-lmfit
From 23d6975448825291c8acb725c8fad360aadbe9a3 Mon Sep 17 00:00:00 2001 From: reneeotten <reneeotten@users.noreply.github.com> Date: Thu, 10 Jan 2019 11:49:06 -0500 Subject: [PATCH] TST: fix nan_policy_test for differential_evolution In SciPy version 1.2 this gives a RuntimeError instead of ValueError. --- tests/test_nose.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/test_nose.py b/tests/test_nose.py index 25ba4b39..5e2ef1c1 100644 --- a/tests/test_nose.py +++ b/tests/test_nose.py @@ -5,6 +5,7 @@ from numpy.testing import (assert_, assert_allclose, assert_almost_equal, assert_equal, dec) import pytest +from scipy.version import version as scipy_version from uncertainties import ufloat from lmfit import Minimizer, Parameters, minimize @@ -394,9 +395,15 @@ def test_nan_policy(self): # the data returned by userfcn self.data[0] = np.nan + major, minor, _micro = scipy_version.split('.', 2) for method in SCALAR_METHODS: - pytest.raises(ValueError, self.mini.scalar_minimize, - SCALAR_METHODS[method]) + if (method == 'differential_evolution' and int(major) > 0 and + int(minor) >= 2): + pytest.raises(RuntimeError, self.mini.scalar_minimize, + SCALAR_METHODS[method]) + else: + pytest.raises(ValueError, self.mini.scalar_minimize, + SCALAR_METHODS[method]) pytest.raises(ValueError, self.mini.minimize)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor