rwl / PYPOWER

Port of MATPOWER to Python
http://rwl.github.io/PYPOWER/api/
Other
329 stars 110 forks source link

TypeError: object of type 'numpy.int64' has no len() #43

Closed kdheepak closed 7 years ago

kdheepak commented 7 years ago

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.