Skip to content

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
@coveralls
Copy link

coveralls commented Sep 23, 2024

Pull Request Test Coverage Report for Build 10994591777

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.883%

Totals Coverage Status
Change from base Build 10823700912: 0.0%
Covered Lines: 854
Relevant Lines: 855

💛 - Coveralls

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

2 participants