diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bc18e345..fab604ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -29,7 +29,7 @@ repos: - id: isort args: ["--profile", "black", "--filter-files"] - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.2.6 hooks: - id: codespell types_or: [python, rst, markdown] diff --git a/linopy/expressions.py b/linopy/expressions.py index 93aab4f0..3bbe4fec 100644 --- a/linopy/expressions.py +++ b/linopy/expressions.py @@ -434,10 +434,10 @@ def __mul__(self, other): ds = ds.assign(const=other.const) return merge(self, ds, dim=FACTOR_DIM, cls=QuadraticExpression) else: - multiplyer = as_dataarray(other, coords=self.coords, dims=self.coord_dims) - coeffs = self.coeffs * multiplyer + multiplier = as_dataarray(other, coords=self.coords, dims=self.coord_dims) + coeffs = self.coeffs * multiplier assert set(coeffs.shape) == set(self.coeffs.shape) - const = self.const * multiplyer + const = self.const * multiplier return self.assign(coeffs=coeffs, const=const) def __rmul__(self, other):