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

refine treatment of missing values #180

Merged
merged 3 commits into from
Oct 26, 2023
Merged

refine treatment of missing values #180

merged 3 commits into from
Oct 26, 2023

Conversation

FabianHofmann
Copy link
Collaborator

@FabianHofmann FabianHofmann commented Oct 26, 2023

closes #144

From release notes:

  • The _fill_value for LinearExpression and QuadraticExpression classes was changed to NaN for the constant array ("const"). This allows to use the where function for expressions with constant values in the argument other.
  • The fillna function for variables was made more secure by raising a warning if the fill value is not of variable-like type.
  • The where and fillna functions for expressions were made more flexible: When passing a scalar value or a DataArray, the values are added as constants to the expression, where there were missing values before. If another expression is passed, the values are added to the expression, where there were missing values before.

harmonize fill_value for constants in expression
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (cf62967) 87.59% compared to head (091933c) 87.70%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
+ Coverage   87.59%   87.70%   +0.10%     
==========================================
  Files          15       15              
  Lines        3225     3244      +19     
  Branches      742      748       +6     
==========================================
+ Hits         2825     2845      +20     
+ Misses        290      288       -2     
- Partials      110      111       +1     
Files Coverage Δ
linopy/variables.py 90.88% <100.00%> (+0.15%) ⬆️
linopy/common.py 91.25% <0.00%> (+0.41%) ⬆️
linopy/expressions.py 89.60% <88.88%> (+0.20%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FabianHofmann FabianHofmann merged commit 6cbfe5c into master Oct 26, 2023
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.

Implement .fillna for Variables
1 participant