Skip to content

Commit

Permalink
fix(scoring/dag): reverse bit-shifts (#104)
Browse files Browse the repository at this point in the history
The bit-shift optimization is done in the wrong order, making the mapping invalid. Scoring is unaffected because the classification is still unique.

See #103
  • Loading branch information
Caceresenzo authored Aug 22, 2024
1 parent e82152b commit aa53350
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crunch/scoring/_format/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ def get_labels(
key,
node,
mapping[
(A[x_index, index]) |
(A[y_index, index] << 1) |
(A[index, y_index] << 2) |
(A[index, x_index] << 3)
(A[x_index, index] << 3) |
(A[y_index, index] << 2) |
(A[index, y_index] << 1) |
(A[index, x_index])
]
)
for index, node in enumerate(nodes)
Expand Down

0 comments on commit aa53350

Please sign in to comment.