2 ms·
The first is just a misunderstanding of the `*` operator. I don't believe there is any context for which this would yield anything other than the element-wise p
by chestervonwinch 10y ago
The first is just a misunderstanding of the `*` operator. I don't believe there is any context for which this would yield anything other than the element-wise product between `x` and `y` (provided these are `ndarray`s).
The second, (the matrix product between `x` and `y`) works provided that the dimensions of `x` and `y` make sense to perform matrix multiplication, i.e., `x` is 1xN and `y` is Nx1.
While I agree there are some idiosyncrasies, I think it is hyperbole to call it a disaster. I will say that one idiosyncrasy that annoyed me up when moving from octave / matlab, was that NumPy's `zeros` and `ones` functions require the dimensions as a tuple, while others, like `rand` or `randn` take multiple arguments as the dimensions.