Skip to content

Commit 57ee06c

Browse files
committed
Simplification
1 parent 1a6607e commit 57ee06c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ffcx/codegeneration/C/form.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ def generator(ir: FormIR, options):
6363
if ir.num_constants > 0:
6464
d["constant_ranks_init"] = (
6565
f"static const int constant_ranks_{ir.name}[{ir.num_constants}] = "
66-
f"{str(ir.constant_ranks).replace('[', '{').replace(']', '}')};"
66+
f"{{{str(ir.constant_ranks)[1:-1]}}};"
6767
)
6868
d["constant_ranks"] = f"constant_ranks_{ir.name}"
6969

7070
shapes = [
7171
f"static const int constant_shapes_{ir.name}_{i}[{len(shape)}] = "
72-
f"{str(shape).replace('(', '{').replace(')', '}')};"
72+
f"{{{str(shape)[1, -1]}}};"
7373
for i, shape in enumerate(ir.constant_shapes)
7474
if len(shape) > 0
7575
]

0 commit comments

Comments
 (0)