Skip to content

Commit

Permalink
Merge pull request #9 from INM-6/bugfix/result_of_same_type
Browse files Browse the repository at this point in the history
Edited the result to return item of each array as opposed to arrays themselves
  • Loading branch information
ackurth authored Apr 20, 2020
2 parents 5f75c51 + c16b1c2 commit 0fa3887
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions elephant/causality/granger.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,10 @@ def pairwise_granger(signals, max_order, information_criterion = 'bic'):
+ directional_causality_y_x_round \
+ instantaneous_causality_round


return Causality(directional_causality_x_y=directional_causality_x_y_round,
directional_causality_y_x=directional_causality_y_x_round,
instantaneous_causality=instantaneous_causality_round,
total_interdependence=total_interdependence_round)
return Causality(directional_causality_x_y=directional_causality_x_y_round.item(),
directional_causality_y_x=directional_causality_y_x_round.item(),
instantaneous_causality=instantaneous_causality_round.item(),
total_interdependence=total_interdependence_round.item())


if __name__ == "__main__":
Expand Down

0 comments on commit 0fa3887

Please sign in to comment.