unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob f3dd17da229916758227774ceff55ef93230a431 3127 bytes (raw)
name: packages/patches/python-accupy-use-matplotx.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
 
From 1da1ed24cfba8a051b6c2f452a67ebfee77ca040 Mon Sep 17 00:00:00 2001
From: Felix Gruber <felgru@posteo.net>
Date: Sun, 23 Apr 2023 15:42:19 +0200
Subject: [PATCH] Use dufte style from matplotx.

The stand-alone dufte package has been deprecated in favor of the dufte
style that has been integrated into matplotx.
---
 tests/test_dot.py  | 10 +++++-----
 tests/test_sums.py | 12 ++++++------
 tox.ini            |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/test_dot.py b/tests/test_dot.py
index 0a40a0c..a8160fe 100644
--- a/tests/test_dot.py
+++ b/tests/test_dot.py
@@ -1,5 +1,5 @@
-import dufte
 import matplotlib.pyplot as plt
+import matplotx
 import numpy as np
 import perfplot
 import pytest
@@ -33,7 +33,7 @@ def test_fdot(cond):
 
 
 def test_accuracy_comparison_illcond(target_cond=None):
-    plt.style.use(dufte.style)
+    plt.style.use(matplotx.styles.dufte)
 
     if target_cond is None:
         target_cond = [10 ** k for k in range(2)]
@@ -61,13 +61,13 @@ def test_accuracy_comparison_illcond(target_cond=None):
     for label, d in zip(labels, data.T):
         plt.loglog(condition_numbers, d, label=label)
 
-    dufte.legend()
+    matplotx.line_labels()
     plt.xlabel("condition number")
-    dufte.ylabel("relative error")
+    matplotx.ylabel_top("relative error")
 
 
 def test_speed_comparison1(n_range=None):
-    plt.style.use(dufte.style)
+    plt.style.use(matplotx.styles.dufte)
 
     if n_range is None:
         n_range = [2 ** k for k in range(2)]
diff --git a/tests/test_sums.py b/tests/test_sums.py
index 1c0f6b0..8cd9ddb 100644
--- a/tests/test_sums.py
+++ b/tests/test_sums.py
@@ -1,5 +1,5 @@
-import dufte
 import matplotlib.pyplot as plt
+import matplotx
 import numpy as np
 import perfplot
 import pytest
@@ -32,7 +32,7 @@ def test_fsum(cond):
 
 
 def test_accuracy_comparison_illcond(target_conds=None):
-    plt.style.use(dufte.style)
+    plt.style.use(matplotx.styles.dufte)
 
     if target_conds is None:
         target_conds = [10 ** k for k in range(1, 2)]
@@ -71,14 +71,14 @@ def test_accuracy_comparison_illcond(target_conds=None):
     for label, color, d in zip(labels, colors, data.T):
         plt.loglog(condition_numbers, d, label=label, color=color)
 
-    dufte.legend()
+    matplotx.line_labels()
     plt.xlabel("condition number")
-    dufte.ylabel("relative error")
+    matplotx.ylabel_top("relative error")
     # plt.gca().set_aspect(1.3)
 
 
 def test_speed_comparison1(n_range=None):
-    plt.style.use(dufte.style)
+    plt.style.use(matplotx.styles.dufte)
 
     if n_range is None:
         n_range = [2 ** k for k in range(2)]
@@ -109,7 +109,7 @@ def test_speed_comparison1(n_range=None):
 
 
 def test_speed_comparison2(n_range=None):
-    plt.style.use(dufte.style)
+    plt.style.use(matplotx.styles.dufte)
 
     if n_range is None:
         n_range = [2 ** k for k in range(2)]
diff --git a/tox.ini b/tox.ini
index 79a53ec..524b3bc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,7 +4,7 @@ isolated_build = True
 
 [testenv]
 deps =
-    dufte
+    matplotx
     perfplot
     pytest
     pytest-cov
-- 
2.39.2


debug log:

solving f3dd17da229916758227774ceff55ef93230a431 ...
found f3dd17da229916758227774ceff55ef93230a431 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).