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` as shorthand for 'auto' #193

Closed jcmgray closed 2 years ago

jcmgray commented 2 years ago

A couple of times I've be caught out (e.g. https://github.com/jcmgray/quimb/issues/130) that the special value for inferring the backend is not backend=None. Might be nice to allow both?

If so would just require a simple:

if backend not in ("auto", None):
    return backend

in parse_backend of contract.py.

dgasmith commented 2 years ago

No objections to making this optional.