When running runpf(casedata), if casedata['gen'] contains a generator that is off on the slack bus, then bustypes returns a ref as follows
ref = zeros(1, dtype=int)
ref = pv[0]
37 states that ref must be a numpy array, and although 7a9b68787f8dae4e1478816647668d237e0c2d4e makes ref an empty numpy array in line 46, line 47 overrides that change.
When running
runpf(casedata)
, ifcasedata['gen']
contains a generator that is off on the slack bus, then bustypes returns a ref as follows37 states that ref must be a numpy array, and although 7a9b68787f8dae4e1478816647668d237e0c2d4e makes ref an empty numpy array in line 46, line 47 overrides that change.