dgasmith / opt_einsum

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

allow backend=None #196

Closed jcmgray closed 2 years ago

jcmgray commented 2 years ago

Description

Allows backend=None, which should be fairly unambiguous, as an alternative to 'auto', closes #193.

Status

codecov[bot] commented 2 years ago

Codecov Report

Merging #196 (86c48c8) into master (a274599) will increase coverage by 0.01%. The diff coverage is 100.00%.

jcmgray commented 2 years ago

Have updated types, though I see the mypy check failed - will try and work out what's going on there.

I've also included a little optimization of infer_backend (1us -> 500ns) making use of lru_cache - let me know if for some reason this isn't wanted! (I think now we don't support older pythons should be fine).