Skip to content

Commit cfba8b6

Browse files
committed
Raise error for unsupported operations with technology and asset
1 parent c96283c commit cfba8b6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/muse/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ def patched_broadcast_compat_data(self, other):
8989
"`broadcast_timeslice` or `distribute_timeslice` (see `muse.timeslices`)."
9090
)
9191

92+
if (isinstance(other, Variable)) and {"technology", "asset"}.issubset(
93+
set(self.dims) | set(getattr(other, "dims", []))
94+
):
95+
raise ValueError()
96+
9297
# The rest of the function is copied directly from
9398
# xarray.core.variable._broadcast_compat_data
9499
if all(hasattr(other, attr) for attr in ["dims", "data", "shape", "encoding"]):

0 commit comments

Comments
 (0)