You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: add BaseExpression.has_terms property
Boolean array, true at slots with at least one live term (vars != -1),
regardless of the constant. Gives downstream code a public way to find
empty constraint rows for masking, without reaching into the internal
vars / _term representation.
Closes#741
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test: group has_terms tests into a class
Per review: TestHasTerms with basic/masking, const-divergence,
merge+reindex, constant-only, and quadratic cases as methods.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: doc/release_notes.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ Upcoming Version
5
5
----------------
6
6
7
7
* Add documentation about `LinearExpression.where` with `drop=True`. Add `BaseExpression.variable_names` property.
8
+
* Add ``BaseExpression.has_terms`` property: boolean array, true at slots with at least one live term (`#741 <https://github.com/PyPSA/linopy/issues/741>`_).
0 commit comments