Skip to content

Commit

Permalink
Fix struct handling when dealing with size-1 arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
feltroidprime committed Nov 5, 2024
1 parent 2dd4e47 commit 776d7be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hydra/garaga/modulo_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from garaga.definitions import BASE, CURVES, N_LIMBS, STARK, CurveID, get_sparsity
from garaga.hints.extf_mul import nondeterministic_extension_field_div
from garaga.hints.io import bigint_split
from garaga.modulo_circuit_structs import Cairo1SerializableStruct
from garaga.modulo_circuit_structs import Cairo1SerializableStruct, u384

BATCH_SIZE = 1 # Batch Size, only used in cairo 0 mode.

Expand Down Expand Up @@ -418,7 +418,7 @@ def write_struct(

if all_pyfelt:
self.input_structs.append(struct)
if len(struct) == 1:
if len(struct) == 1 and isinstance(struct, u384):
return self.write_element(struct.elmts[0], write_source)
else:
return self.write_elements(struct.elmts, write_source)
Expand Down

0 comments on commit 776d7be

Please sign in to comment.