Skip to content

Commit

Permalink
Fixed plot_network pandas warning
Browse files Browse the repository at this point in the history
  • Loading branch information
PauBadiaM committed Nov 23, 2023
1 parent 17f6f9b commit 4befce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decoupler/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ def get_target_idxs(n_targets, obs, net, by_abs):
elif isinstance(n_targets, list):
t_idx = np.isin(net['target'].astype(str), n_targets)
elif isinstance(n_targets, int):
net['prod'] = [obs.loc[:, t][0] * w if t in obs.columns else 0 for t, w in zip(net['target'], net['weight'])]
net['prod'] = [obs.iloc[0][t] * w if t in obs.columns else 0 for t, w in zip(net['target'], net['weight'])]
if by_abs:
net['prod'] = abs(net['prod'])
t_idx = (
Expand Down

0 comments on commit 4befce8

Please sign in to comment.