Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion linopy/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,9 @@ def _add_constant_legacy(
if is_nan_scalar(other):
check_user_nan()
warn_legacy_absence(self.const)
return self.assign(const=self.const.fillna(0) + other)
return self.assign(
const=self.const.fillna(0) + cast("float | np.number", other)
)
self_const, da, needs_reindex = self._broadcast_and_align(
other, fill_value, join
)
Expand Down
Loading