-
Notifications
You must be signed in to change notification settings - Fork 49
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
padarray inconsistent behavior for n=1 axes #259
Comments
A similar problem just came up in another code base in a fairly different application. The handling of zero padding on singleton dimensions seems require (sometimes difficult) special handling, especially if you need shape stability.
|
The following seems to be a fix. Not sure why
|
If you could write out a few simple test cases, that would be great. |
Ok, will do. I just wasn't sure if there was intended behavioral differences between copy! and .=, happy to try to do a few test cases in few days. |
I'm not sure if I fully understand the issue yet either, but the test cases would help confirm that we have a fix is in place and it stays fixed. |
I found the following surprising.
For n!=1 this succeeds and pads the repeated matrix which is of dimension (50,100,n) to be (60,110,n). For n=1, this fails with the following error message.
"DimensionMismatch: supplied axes do not agree with the size of the array (got size (1,) for the array and (0,) for the indices"
Maybe there is something I am not understanding, but I would have expected the n=1 case to behave similarly.
The text was updated successfully, but these errors were encountered: