Skip to content

Commit d0034b7

Browse files
authored
Merge pull request #2 from NFFT/python-code-format-patches
Fixes by format action
2 parents 6a4fa3e + 9298c93 commit d0034b7

File tree

9 files changed

+25
-15
lines changed

9 files changed

+25
-15
lines changed

src/pyANOVAapprox/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
import math
12
import threading
23
from math import acos, isnan
3-
import math
44

55
import numpy as np
66
from pyGroupedTransforms import *
77
from scipy.sparse.linalg import lsqr
88
from scipy.special import erf
9-
#from sklearn.metrics import roc_auc_score
109

11-
def get_superposition_set(d, ds): #TODO: Später funktion aut GT verwenden
10+
# from sklearn.metrics import roc_auc_score
11+
12+
13+
def get_superposition_set(d, ds): # TODO: Später funktion aut GT verwenden
1214
"""
1315
get_superposition_set( d::Int, ds::Int )::Vector{Vector{Int}}
1416
@@ -27,6 +29,7 @@ def get_superposition_set(d, ds): #TODO: Später funktion aut GT verwenden
2729

2830
return [tuple(item) for item in returnset]
2931

32+
3033
def bisection(l, r, fun, maxiter=1000):
3134
lval = fun(l)
3235
rval = fun(r)

src/pyANOVAapprox/approx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
from pyGroupedTransforms.GroupedTransform import * # TODO: Kann wahrscheinlich weg sobald in pyGroupedTransform GreoupedTransform exportiert wird
2+
13
from pyANOVAapprox import *
24
from pyANOVAapprox.fista import *
3-
from pyGroupedTransforms.GroupedTransform import * #TODO: Kann wahrscheinlich weg sobald in pyGroupedTransform GreoupedTransform exportiert wird
45

56
bases = ["per", "cos", "cheb", "std", "chui1", "chui2", "chui3", "chui4", "mixed"]
67
types = {

src/pyANOVAapprox/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def get_acc(a, X=None, y=None, lam=None):
164164
return {l: _acc(a, l, X, y) for l in list(a.fc)}
165165

166166

167-
#def _auc(a, lam, X, y): # helpfunction for get_auc #TODO: implement ROC AUC Score
167+
# def _auc(a, lam, X, y): # helpfunction for get_auc #TODO: implement ROC AUC Score
168168
# if y is None:
169169
# y = a.y
170170
#

src/pyANOVAapprox/fista.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
from pyGroupedTransforms.GroupedCoefficients import * # TODO: Kann wahrscheinlich weg sobald in pyGroupedTransform GreoupedTransform exportiert wird
2+
13
from pyANOVAapprox import *
2-
from pyGroupedTransforms.GroupedCoefficients import * #TODO: Kann wahrscheinlich weg sobald in pyGroupedTransform GreoupedTransform exportiert wird
4+
35

46
def bisection(
57
fun, fval, left, right, fleft, fright, max_iter=10, tol=1e-15, verbose=False

tests/cheb_fista.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66

77
import numpy as np
88
import TestFunctionCheb
9-
import pyANOVAapprox as ANOVAapprox
109
from pyGroupedTransforms import *
1110

11+
import pyANOVAapprox as ANOVAapprox
12+
1213
d = 8
1314
ds = 2
1415
M = 1000 # eigentlich 10000

tests/cheb_lsqr.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66

77
import numpy as np
88
import TestFunctionCheb
9-
import pyANOVAapprox as ANOVAapprox
109
from pyGroupedTransforms import *
1110

11+
import pyANOVAapprox as ANOVAapprox
12+
1213
d = 8
1314
ds = 2
1415
M = 1000 # eigentlich 10000

tests/per_fista.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
sys.path.insert(0, src_aa)
66

77
import numpy as np
8-
import pyANOVAapprox as ANOVAapprox
9-
from TestFunctionPeriodic import AS, f, fc, norm
108
from pyGroupedTransforms import *
9+
from TestFunctionPeriodic import AS, f, fc, norm
10+
11+
import pyANOVAapprox as ANOVAapprox
1112

1213
d = 6
1314
ds = 2

tests/per_lsqr.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
sys.path.insert(0, src_aa)
88

99
import numpy as np
10-
import pyANOVAapprox as ANOVAapprox
11-
from TestFunctionPeriodic import *
1210
from pyGroupedTransforms import *
11+
from TestFunctionPeriodic import *
12+
13+
import pyANOVAapprox as ANOVAapprox
1314

1415
d = 6
1516
ds = 2
@@ -55,9 +56,9 @@
5556
print("l2 rand ds: ", err_l2_rand_ds)
5657
print("l2 rand U: ", err_l2_rand_U)
5758

58-
assert err_L2_ds < 0.01
59+
assert err_L2_ds < 0.01
5960
assert err_L2_U < 0.005
6061
assert err_l2_ds < 0.01
6162
assert err_l2_U < 0.005
62-
assert err_l2_rand_ds < 0.01
63+
assert err_l2_rand_ds < 0.01
6364
assert err_l2_rand_U < 0.005

tests/run_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Script to run all tests and return any failures
1313
def run_tests():
1414
test_files = [
15-
# "tests/wav_lsqr.py",
15+
# "tests/wav_lsqr.py",
1616
"tests/cheb_fista.py",
1717
"tests/cheb_lsqr.py",
1818
"tests/per_fista.py",

0 commit comments

Comments
 (0)