[Numpy-discussion] kron bug with zero-length dimensions?

Sven Schreiber svetosch at gmx.net
Sat Jan 27 17:48:42 EST 2007

Sven Schreiber schrieb:
> Hi,
> the kron(a,b) function seems to allow shapes such as (0,x) or (y,0) only
> for the second argument b, not for the first argument a. (See below for
> examples.)
> Maybe it's too harsh to call it a bug because the result is typically
> not defined mathematically. But then why differentiate between allowing
> those things for b (very useful), but not for a (thus requiring
> workarounds.)

Well in the meantime I learned several things;

for my particular problem matlib.repmat is better suited than kron
anyway (note that repmat isn't mentioned yet in the numpy book),

and "zero-length dimensions" may not be the accurate term in numpy-speak
(would zero-length axis be ok?),

however I still haven't learned the reason for kron's partial limitation
described above... any insights on this?

thanks again,

More information about the NumPy-Discussion mailing list