We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc70878 commit 65da0ecCopy full SHA for 65da0ec
_2025/solutions/day10.py
@@ -16,7 +16,8 @@
16
import re
17
from typing import ClassVar
18
19
-from numpy import transpose
+import numpy as np
20
+import numpy.typing as npt
21
from scipy.optimize import linprog
22
23
from aoc.models.base import SolutionBase
@@ -199,8 +200,8 @@ def min_presses_for_machine(
199
200
c = [1] * N
201
202
# Build equality constraints: sum(button_vectors * presses) = target
- A_eq = [self.button_to_vector(btn, num_jolt) for btn in buttons] # noqa: N806
203
- A_eq = transpose(A_eq) # noqa: N806
+ A_ls = [self.button_to_vector(btn, num_jolt) for btn in buttons] # noqa: N806
204
+ A_eq: npt.NDArray[np.int_] = np.transpose(A_ls) # noqa: N806
205
b_eq = target
206
integrality = [1] * N
207
0 commit comments