Remove index to access descr (#528)
* Remove the index_access_descr from Einsum object. * Ruff corrections. * Make the index_to_access_descriptor a cached property that will automatically build a dictionary for strings to access descriptor. Note that this may not be the exact same string as what the user passed in pt.einsum, but will be equivalent. * Add a comment on the new cached property. * Fixing comments made by ruff. * Remove the cached property. Add in a warning to users requesting a subscript string. * Remove duplicated code in generating a einsum string. The numpy code generator returned a string which contained spaces after the punctuation. It now no longer does. * Numpy code generator seems to be dependent on the spaces after the punctuation. So, I am adding those back in. * Deprecate the old function get_einsum_subscript_str, in favor of get_einsum_specification. Update the code to use the new function. * Visualization needed to be updated as well. * Update pytato/utils.py Co-authored-by:Andreas Klöckner <inform@tiker.net> * Update pytato/utils.py Co-authored-by:
Andreas Klöckner <inform@tiker.net> * Updates target. * Update the documentation to be more clear. * Fixed a typo. * Remove excess assert statement. * Ensure there is a unique error message for arguments of string type since we are removing that functionality. --------- Co-authored-by:
Andreas Klöckner <inform@tiker.net>
Showing
- pytato/array.py 7 additions, 21 deletionspytato/array.py
- pytato/target/python/numpy_like.py 2 additions, 26 deletionspytato/target/python/numpy_like.py
- pytato/transform/__init__.py 0 additions, 3 deletionspytato/transform/__init__.py
- pytato/transform/einsum_distributive_law.py 0 additions, 4 deletionspytato/transform/einsum_distributive_law.py
- pytato/transform/remove_broadcasts_einsum.py 0 additions, 1 deletionpytato/transform/remove_broadcasts_einsum.py
- pytato/utils.py 55 additions, 17 deletionspytato/utils.py
- pytato/visualization/fancy_placeholder_data_flow.py 2 additions, 2 deletionspytato/visualization/fancy_placeholder_data_flow.py
- test/test_jax.py 1 addition, 0 deletionstest/test_jax.py
- test/test_pytato.py 7 additions, 14 deletionstest/test_pytato.py
Loading
Please register or sign in to comment