Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Creation of Phasor Array Using Load from NumPy Array #115

Open
engineerjoe440 opened this issue Aug 3, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@engineerjoe440
Copy link
Owner

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
@engineerjoe440 engineerjoe440 added the enhancement New feature or request label Aug 3, 2023
@engineerjoe440 engineerjoe440 added this to the Next Version 0.4.0 milestone Aug 3, 2023
@engineerjoe440 engineerjoe440 self-assigned this Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant