Skip to content
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
4 changes: 4 additions & 0 deletions pkgs/development/python-modules/dedupe-pylbfgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ buildPythonPackage rec {
hash = "sha256-H416dgZQxyqsnhmlK5keW8cJWY6gea4mebVuP0IEVOU=";
};

patches = [
./tests-numpy-2.4.patch # https://github.com/dedupeio/pylbfgs/pull/52

This comment was marked as outdated.

];

build-system = [
cython
numpy
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/tests/test_lbfgs.py b/tests/test_lbfgs.py
index 1af91ef..65e2da9 100644
--- a/tests/test_lbfgs.py
+++ b/tests/test_lbfgs.py
@@ -28,16 +28,16 @@ class TestOWLQN:

def test_owl_line_search_default(self):
def f(x, g, *args):
- g[0] = 2 * x
- return x ** 2
+ g[0] = 2 * x[0]
+ return x[0] ** 2

with pytest.warns(UserWarning, match="OWL-QN"):
xmin = fmin_lbfgs(f, 100., orthantwise_c=1)

def test_owl_line_search_warning_explicit(self):
def f(x, g, *args):
- g[0] = 2 * x
- return x ** 2
+ g[0] = 2 * x[0]
+ return x[0] ** 2

with pytest.warns(UserWarning, match="OWL-QN"):
xmin = fmin_lbfgs(f, 100., orthantwise_c=1, line_search='default')
Comment on lines +1 to +25

This comment was marked as outdated.

Loading