Skip to content

Commit

Permalink
Merge pull request #369 from ConnectedSystems/develop
Browse files Browse the repository at this point in the history
Revert earlier commit to re-enable handling of multi-output results
  • Loading branch information
ConnectedSystems committed Oct 5, 2020
2 parents 9f163cb + d52d604 commit 9ee2379
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/SALib/util/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,13 @@ def analyze(self, func, *args, **kwargs):
def to_df(self):
"""Convert results to Pandas DataFrame."""
an_res = self._analysis
if an_res is None:
raise RuntimeError("Analysis not yet conducted")

return an_res.to_df()
if isinstance(an_res, ResultDict):
return an_res.to_df()
elif isinstance(an_res, dict):
# case where analysis result is a dict of ResultDicts
return [an.to_df() for an in list(an_res.values())]

raise RuntimeError("Analysis not yet conducted")

def plot(self):
"""Plot results"""
Expand Down

0 comments on commit 9ee2379

Please sign in to comment.