Skip to content

Commit

Permalink
Edited the result to return item of each array as opposed to arrays t…
Browse files Browse the repository at this point in the history
…hemselves.
  • Loading branch information
rjurkus committed Apr 20, 2020
1 parent 5f75c51 commit c16b1c2
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 c16b1c2

Please sign in to comment.