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

Fix singleton on last dimension error in prelude #175

Merged
merged 4 commits into from
Nov 16, 2020
Merged

Conversation

po09i
Copy link
Member

@po09i po09i commented Nov 12, 2020

Description

This PR addresses an issue in the prelude wrapper that returned the wrong number of dimensions if the input had a singleton in the last dimension. The fix looks at the input and compares it to the output to return the appropriate number of dimensions. This allows to also fix a case where both last dimensions would be 1. I've added tests for all cases (X,Y,1), (X,1) and (X,1,1)

Linked issues

Fixes #174

@po09i po09i added the bug Something isn't working label Nov 12, 2020
@po09i po09i self-assigned this Nov 12, 2020
@po09i po09i changed the title Fix singleton on last dim error in prelude Fix singleton on last dimension error in prelude Nov 12, 2020
@po09i po09i merged commit 38c5f65 into master Nov 16, 2020
@po09i po09i deleted the ad/prelude-singleton branch November 16, 2020 05:00
kousu pushed a commit that referenced this pull request Mar 20, 2021
* Add an extra dimension for each missing dimension

* Add tests for singleton 2nd dim, 3rd dim, 2nd and 3rd dim

* Apply comments from code review

* Updated comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prelude does not output the same shape as the input
2 participants