Closed tamuratak closed 7 years ago
This is because dot method is implemented as
( x[false,:new,true] * y.transpose[false,:new] ).sum(-1)
and broadcast rule is applied to axes with shape[axis]==1. Shape check is added in the latest commit. Thank you for reporting.
Thank you too.
Hi, the current behavior of NArray#dot seems weird. Given NArray with a vector-like shape, NArray#dot returns a certain result, never raise exception. I think, in case (b) and case (c-2), exception should be raised.
Numpy example.
Versions.
I want to emphasize that I am not saying NArray should behave in the same way as numpy. I don't know much about python and numpy. I am just saying the current behavior of NArray#dot is unreasonable.
Regards.