From 4ac624237b4fe48c0f9e2f9d69490a542de6b211 Mon Sep 17 00:00:00 2001 From: Daniel Brown <ddb@star.sr.bham.ac.uk> Date: Tue, 21 Jan 2014 15:57:32 +0000 Subject: [PATCH] fixing output selector --- pykat/finesse.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pykat/finesse.py b/pykat/finesse.py index 5d227db..8c7196b 100644 --- a/pykat/finesse.py +++ b/pykat/finesse.py @@ -75,14 +75,14 @@ class katRun(object): def __getitem__(self, value): idx = [i for i in range(len(self.ylabels)) if self.ylabels[i].split(" ")[0] == str(value)] - - if len(idx) > 0 and self.y.shape == (): + + if len(idx) > 0 and self.y.shape == (): # In the case we have a noxaxis and just one output... return float(self.y) - elif len(idx) == 1 and len(self.y.shape) >= 1: + elif len(idx) == 1 and len(self.y.shape) == 1: # only selecting a single output from a 1D array - if self.y.size == 1: + if self.y.size == 1: return self.y else: return self.y[idx[0]] -- GitLab