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

Add custom pint wrapper #149

Merged
merged 3 commits into from
Nov 17, 2023
Merged

Add custom pint wrapper #149

merged 3 commits into from
Nov 17, 2023

Conversation

Saelyos
Copy link
Collaborator

@Saelyos Saelyos commented Nov 17, 2023

@Saelyos Saelyos added bug Something isn't working enhancement New feature or request labels Nov 17, 2023
@Saelyos Saelyos self-assigned this Nov 17, 2023
Copy link
Member

@benoit9126 benoit9126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Please add a line in the changelog and maybe some documentation related to the possibility to give a quantity of array or an array of quantities (maybe with different units such as v=[Q_(400, "V"), Q_(0.4, "kV"), 400])

Copy link
Member

@alihamdan alihamdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good, thank you.

I just think it is better if this module was private: _wrapper.py. In the future we might delete it if pint evolves to have these improvements built in and we don't want anyone depending on it.

I also left two comments about additional tiny performance improvements, feel free to include.

roseau/load_flow/wrapper.py Outdated Show resolved Hide resolved
roseau/load_flow/wrapper.py Outdated Show resolved Hide resolved
@Saelyos Saelyos merged commit f7f6070 into develop Nov 17, 2023
5 checks passed
@Saelyos Saelyos deleted the wrapper branch November 17, 2023 16:02
@benoit9126 benoit9126 mentioned this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: DimensionalityError when voltage of the source is Quantity
3 participants