From 34babef7065c32d1e7c5543ec07c704671722864 Mon Sep 17 00:00:00 2001
From: mmpe <mmpe@dtu.dk>
Date: Tue, 1 Dec 2020 08:07:16 +0100
Subject: [PATCH] convert type to int before using as index

---
 py_wake/utils/area_overlapping_factor.py | 2 +-
 py_wake/wind_turbines.py                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/py_wake/utils/area_overlapping_factor.py b/py_wake/utils/area_overlapping_factor.py
index 3efcd645a..05941392d 100644
--- a/py_wake/utils/area_overlapping_factor.py
+++ b/py_wake/utils/area_overlapping_factor.py
@@ -43,7 +43,7 @@ class AreaOverlappingFactor():
 
         The calculation formula can be found in Eq. (A1) of :
         [Ref] Feng J, Shen WZ, Solving the wind farm layout optimization
-        problem using Random search algorithm, Reneable Energy 78 (2015)
+        problem using Random search algorithm, Renewable Energy 78 (2015)
         182-192
         Note that however there are typos in Equation (A1), '2' before alpha
         and beta should be 1.
diff --git a/py_wake/wind_turbines.py b/py_wake/wind_turbines.py
index 86f619054..203fce873 100644
--- a/py_wake/wind_turbines.py
+++ b/py_wake/wind_turbines.py
@@ -129,7 +129,7 @@ class WindTurbines():
             P = np.array([self.power_funcs[t](ws) for t, ws in zip(type_i, ws_i)])
             return CT, P
         else:
-            return self.ct_funcs[t[0]](ws_i), self.power_funcs[t[0]](ws_i)
+            return self.ct_funcs[int(t[0])](ws_i), self.power_funcs[int(t[0])](ws_i)
 
     def set_gradient_funcs(self, power_grad_funcs, ct_grad_funcs):
         def add_grad(f_lst, df_lst):
-- 
GitLab