You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pdl> append( pdl(1), pdl(2), zeroes(3) )
Error in PDL::Primitive::append: parameter 'c' index mn size 2, but ndarray dim has size 3
at primitive.pd line 1513.
pdl> append( pdl([1,1]), pdl(2), zeroes(3) )
pdl> append( pdl([1,1]), pdl(2), zeroes(4) )
Error in PDL::Primitive::append: parameter 'c' index mn size 3, but ndarray dim has size 4
Looks like it only complains if the output is too big, not if its too small
The message is emitted by pdl_dim_checks, but I'm not familiar enough with the code to know if this is just an issue with append not being strict enough or a larger issue in pdl_dim_checks
It would also have rejected if the output size were too small, but not 1. It was allowing a dim size of 1, which is fine for inputs since that will match any size. The fix here is to allow non-matching size of 1 for inputs, but not to allow that for outputs.
PDL 2.084
While rehabilitating the tests for PDL::Primitive, I came across this behavior:
This works as expected:
But this works partially, without any complaints:
The text was updated successfully, but these errors were encountered: