Skip to content
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

[WIP] Enable ellipsis in patterns for parse_shape. #162

Merged

Conversation

dmitriy-serdyuk
Copy link

@dmitriy-serdyuk dmitriy-serdyuk commented Dec 16, 2021

Now parse_shape can accept ellipsis the same as other operations.

For example,
parse_shape(np.zeros((10, 20, 30, 40)), 'a ... b')
returns
dict(a=10, b=40)

TODO:

  • add documentation

Fixes #161

@dmitriy-serdyuk dmitriy-serdyuk changed the title [WIP] Enable ellipsis in patterns for parse_shape. Enable ellipsis in patterns for parse_shape. Dec 26, 2021
@dmitriy-serdyuk
Copy link
Author

@arogozhnikov could you take a look and enable the automatic tests for this PR?

@dmitriy-serdyuk dmitriy-serdyuk force-pushed the add-parse-shape-ellipsis branch 4 times, most recently from d8f6e81 to 25849b2 Compare January 7, 2022 15:03
@dmitriy-serdyuk dmitriy-serdyuk changed the title Enable ellipsis in patterns for parse_shape. [WIP] Enable ellipsis in patterns for parse_shape. Jan 7, 2022
Now parse_shape can accept ellipsis the same as other operations.
For example,
`parse_shape(np.zeros((10, 20, 30, 40)), 'a ... b')`
returns
`dict(a=10, b=40)`
@arogozhnikov
Copy link
Owner

looks good, thanks for commenting tricky places with mxnet and keras

@arogozhnikov arogozhnikov merged commit b2fdadd into arogozhnikov:master Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature suggestion] add ellipsis to parse_shape
2 participants