From 71add83498d0fea1524cb3f523e9a1603e4a8b39 Mon Sep 17 00:00:00 2001 From: Edward Burnell Date: Thu, 27 Feb 2020 22:11:29 -0800 Subject: [PATCH] python 3 compatibility --- solar/relaxed_constants.py | 5 ++--- solar/solar.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/solar/relaxed_constants.py b/solar/relaxed_constants.py index b2f810d..970fede 100644 --- a/solar/relaxed_constants.py +++ b/solar/relaxed_constants.py @@ -44,8 +44,7 @@ def post_process(sol): bdvars = [d for d in sol.program.varkeys if "Relax" in str(d) and "before" not in str(d) and sol(d).magnitude >= 1.001] if bdvars: - print "GP iteration has relaxed constants" - print sol.program.result.table(varkeys) + print("GP iteration has relaxed constants") + print(sol.program.result.table(varkeys)) return bdvars - diff --git a/solar/solar.py b/solar/solar.py index d00a55c..5f6cd1f 100644 --- a/solar/solar.py +++ b/solar/solar.py @@ -524,7 +524,7 @@ def setup(self, aircraft, latitude=35, day=355): if self.aircraft.Npod is not 0 and self.aircraft.Npod is not 1: Nwing, Npod = self.aircraft.wing.N, self.aircraft.Npod ypod = Nwing/((Npod-1)/2 + 1) - ypods = [ypod*n for n in range(1, (Npod-1)/2+1)] + ypods = [ypod*n for n in range(1, (Npod-1)//2 + 1)] Sgust, Mgust = self.winggust.S, self.winggust.M qgust, Sg, Mg = self.winggust.q, self.wingg.S, self.wingg.M qg = self.wingg.q