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

Allow float input to BaseCircuit.predict function #304

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adrianusler
Copy link
Contributor

@adrianusler adrianusler commented Aug 16, 2024

I have made a small change to the BaseCircuit.predict function that now allows both floats and lists/arrays are inputs.

frequencies = (
    np.array([frequencies], dtype=float) if isinstance(frequencies, float)
    else np.array(frequencies, dtype=float)
)

So now, one can predict impedances at a single frequency (say, 10.) by calling

Z = <circuit object>.predict(10.)

Closes #277.

@mdmurbach mdmurbach self-requested a review August 27, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BaseCircuit.predict() won't take float as input
1 participant