markflorisson88/cython — comment on commit 31b2d0cef7ae404eb92cfaaf4f50210e65f07dc4
File: tests/run/memslice.pyx line 1780
By dagss:

Hmm. I find this aspect of NumPy to be a little confusing, or perhaps "too much convenience"... In NumPy one can also do

a[:, :] = b[None, :]

or

a[:, :] = b[:, None]

(henceforth "newaxis-notation"), where None inserts a new 1-length dimension. This is what I usually do (as proof, I can't remember which of the above corresponds to a[:, :] = b[:]).

The a[:, :] = b[:] notation is truly useful when one does not know the number of dimensions; but that is never the case currently in Cython.

BTW, do you support newaxis-notation in Cython now? It's more general than broadcasting so should perhaps be implemented first anyway. Provided that we do want to support the more generic newaxis-notation then the a[:, :] = b[:] notation could perhaps be delayed until the question about whether we want it or not is settled -- it's easier to add it than to remove it.