-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements stringification for arrays #181
base: main
Are you sure you want to change the base?
Conversation
986e50a
to
2007994
Compare
Does this supersede #179? |
Nope, I would say adds to it, as this PR doesn't define |
kwargs["shape"] = tuple(self.rec(dim) for dim in expr.shape) | ||
return p.CallWithKwargs("IndexLambda", | ||
parameters=(), | ||
kw_parameters=kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the expression? :)
return next(filter(pred, iterable), default) | ||
|
||
|
||
def _get_einsum_spec(einsum: Einsum) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test this against "parse_einsum
" to be "post-normalization inverse".
|
||
# {{{ stringify mapper | ||
|
||
class StringifyMapper(StringifyMapperBase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exponential complexity in string concat?
Draft because: