Skip to content

Commit

Permalink
Remove __future__ imports (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgkirsch committed Jul 6, 2021
1 parent cf33ca1 commit a67e730
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 16 deletions.
1 change: 0 additions & 1 deletion gpfit/ba_init.py
@@ -1,5 +1,4 @@
"Implements ba_init"
from __future__ import print_function
from numpy import ones, hstack, zeros, tile, argmin
from numpy.linalg import lstsq, matrix_rank
from numpy.random import permutation as randperm
Expand Down
2 changes: 0 additions & 2 deletions gpfit/fit_constraintset.py
@@ -1,6 +1,4 @@
" fit constraint set "
from __future__ import print_function
from __future__ import division
from gpkit import ConstraintSet
from gpkit import Variable, NomialArray, NamedVariables, VectorVariable
from numpy import amax, array, hstack, where
Expand Down
1 change: 0 additions & 1 deletion gpfit/implicit_softmax_affine.py
@@ -1,5 +1,4 @@
"Implements ISMA residual function"
from __future__ import division
from numpy import ones, nan, inf, hstack, dot, tile
from .lse_implicit import lse_implicit

Expand Down
2 changes: 0 additions & 2 deletions gpfit/levenberg_marquardt.py
@@ -1,6 +1,4 @@
"Implements LM"
from __future__ import print_function
from __future__ import division
from time import time
from sys import float_info
import numpy as np
Expand Down
2 changes: 0 additions & 2 deletions gpfit/lse_implicit.py
@@ -1,6 +1,4 @@
"Implements lse_implicit"
from __future__ import print_function
from __future__ import division
from numpy import zeros, spacing, exp, log, tile


Expand Down
1 change: 0 additions & 1 deletion gpfit/lse_scaled.py
@@ -1,5 +1,4 @@
"Implements lse_scaled"
from __future__ import division
from numpy import tile, exp, log


Expand Down
1 change: 0 additions & 1 deletion gpfit/max_affine.py
@@ -1,5 +1,4 @@
"Implements MA residual function"
from __future__ import division
import numpy as np


Expand Down
4 changes: 2 additions & 2 deletions gpfit/plot_fit.py
@@ -1,10 +1,10 @@
"Fit plotting"
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from gpfit.fit import fit
from gpfit.print_fit import print_MA, print_SMA


# pylint: disable=invalid-name
# pylint: disable=too-many-locals
def plot_fit_1d(udata, wdata, K=1, fitclass='MA', plotspace='log'):
Expand All @@ -22,7 +22,6 @@ def plot_fit_1d(udata, wdata, K=1, fitclass='MA', plotspace='log'):
WW += [np.exp(B[k])*uu**A[k]]
stringlist = print_MA(A, B, 1, K)


if fitclass == 'SMA':
wexps, = cstrt.left.exps
alpha, = list(wexps.values())
Expand Down Expand Up @@ -53,6 +52,7 @@ def plot_fit_1d(udata, wdata, K=1, fitclass='MA', plotspace='log'):
plt.show()
return f, ax


if __name__ == "__main__":
N = 51
U = np.logspace(0, np.log10(3), N)
Expand Down
1 change: 0 additions & 1 deletion gpfit/print_fit.py
@@ -1,5 +1,4 @@
"Implements functions for raw fit printing from params"
from __future__ import print_function
from numpy import exp


Expand Down
1 change: 0 additions & 1 deletion gpfit/softmax_affine.py
@@ -1,5 +1,4 @@
"Implements SMA residual function"
from __future__ import division
from numpy import size, inf, nan, ones, hstack, dot, tile
from .lse_scaled import lse_scaled

Expand Down
3 changes: 1 addition & 2 deletions gpfit/xfoil_wrapper.py
@@ -1,9 +1,8 @@
" python wrapper to call xfoil "
from __future__ import print_function
from __future__ import division
import subprocess
import numpy as np


#pylint: disable=invalid-name, bare-except, too-many-locals
#pylint: disable=too-many-arguments

Expand Down

0 comments on commit a67e730

Please sign in to comment.