Skip to content

Commit

Permalink
fix for exprs with constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Oct 13, 2023
1 parent 58c78b3 commit 6f902a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cotengra/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,10 @@ def array_contract_expression(
--------
einsum_expression, array_contract, array_contract_tree
"""
inputs, output, size_dict = normalize_input(
inputs, output, size_dict, shapes, canonicalize=canonicalize
)

if constants is not None:
# handle constants specially with autoray
return _array_contract_expression_with_constants(
Expand All @@ -673,10 +677,6 @@ def array_contract_expression(
**kwargs,
)

inputs, output, size_dict = normalize_input(
inputs, output, size_dict, shapes, canonicalize=canonicalize
)

if cache and can_hash_optimize(optimize.__class__):
try:
key = hash_contraction(
Expand Down

0 comments on commit 6f902a7

Please sign in to comment.