Support Creation of Phasor Array Using Load from NumPy Array
Opened this issue · 0 comments
engineerjoe440 commented
There's got to be a way to support this syntax:
import numpy as np
import electricpy as ep
x = np.arrange(0, 720, 1)
v = ep.phasor(1, 178 + x)
Presently, there's an error:
Traceback (most recent call last):
File "<pyshell#27>", line 1, in <module>
v = ep.phasor(1, 178 + x)
File "C:\Python311\Lib\site-packages\electricpy\phasors.py", line 89, in phasor
return _c.rect(mag, _np.radians(ang))
TypeError: only size-1 arrays can be converted to Python scalars