Skip to content

Commit 9be1533

Browse files
committed
fix: add scipy-stubs
1 parent 65da0ec commit 9be1533

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed

_2025/solutions/day10.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
import re
1717
from typing import ClassVar
1818

19-
import numpy as np
20-
import numpy.typing as npt
19+
from numpy import transpose
2120
from scipy.optimize import linprog
2221

2322
from aoc.models.base import SolutionBase
@@ -200,8 +199,8 @@ def min_presses_for_machine(
200199
c = [1] * N
201200

202201
# Build equality constraints: sum(button_vectors * presses) = target
203-
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
202+
A_eq = [self.button_to_vector(btn, num_jolt) for btn in buttons] # noqa: N806
203+
A_eq = transpose(A_eq) # noqa: N806
205204
b_eq = target
206205
integrality = [1] * N
207206

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dependencies = [
1111
"bs4<1.0.0,>=0.0.2",
1212
"rustworkx>=0.17.1",
1313
"scipy>=1.16.3",
14+
"scipy-stubs>=1.16.3.3",
1415
]
1516

1617
[dependency-groups]

uv.lock

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)