Skip to content

Commit

Permalink
Update ext2int.py
Browse files Browse the repository at this point in the history
Converting n2i values to `int` type.
  • Loading branch information
rwl authored Mar 18, 2021
1 parent e59c41a commit bad043c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypower/ext2int.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def ext2int(ppc, val_or_field=None, ordering=None, dim=0):
## in-service
n2i = sparse((range(nb), (ppc["bus"][:, BUS_I], zeros(nb))),
shape=(max(ppc["bus"][:, BUS_I].astype(int)) + 1, 1))
n2i = array( n2i.todense().flatten() )[0, :] # as 1D array
n2i = (array( n2i.todense().flatten() )[0, :]).astype(int) # as 1D array
bs = (bt != NONE) ## bus status
o["bus"]["status"]["on"] = find( bs ) ## connected
o["bus"]["status"]["off"] = find( ~bs ) ## isolated
Expand Down

0 comments on commit bad043c

Please sign in to comment.