Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Linde committed Dec 19, 2024
1 parent b514431 commit 61213be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ dependencies = [
"gymnasium>=0.28.1",
"networkx[default]>=2.6.3",
"numpy>=1.21.6",
"numpy.typing",
"pygame",
"qiskit>=1.0.0",
]
Expand Down
5 changes: 3 additions & 2 deletions qgym/envs/routing/routing_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ def obtain_observation(
observation["connection_graph"] = self.connection_matrix

if self.observe_legal_surpasses:
is_legal_surpass = np.array(
[self.is_legal_surpass(*gate) for gate in interaction_gates_ahead]
is_legal_surpass = np.fromiter(
(self.is_legal_surpass(*gate) for gate in interaction_gates_ahead),
dtype=np.bool,
)
observation["is_legal_surpass"] = is_legal_surpass

Expand Down

0 comments on commit 61213be

Please sign in to comment.