dgasmith / opt_einsum

⚡️Optimizing einsum functions in NumPy, Tensorflow, Dask, and more with contraction order optimization.
https://dgasmith.github.io/opt_einsum/
MIT License
822 stars 67 forks source link

handle empty contraction list in PathInfo #229

Closed jcmgray closed 1 month ago

jcmgray commented 2 months ago

Description

This simply handles the case when PathInfo is constructed with an empty path (e.g. for the no-op contraction eq="->") with some defaults rather than raising ZeroDivisionError. See https://github.com/jcmgray/quimb/issues/231.

Status

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.44%. Comparing base (1a984b7) to head (fda68c3). Report is 3 commits behind head on master.

:exclamation: Current head fda68c3 differs from pull request most recent head c1ca004. Consider uploading reports for the commit c1ca004 to get more accurate results

Additional details and impacted files