[Numpy-discussion] What is an empty matrix ?

John Reid j.reid at mail.cryst.bbk.ac.uk
Wed Jul 4 09:21:35 EDT 2007


David Cournapeau wrote:
> Hi,
> 
>     I was wondering what an empty matrix is, and what it is useful for 
> (by empty matrix, I mean something created by numpy.matrix([])) ? Using 
> those crash some functions (see for example scipy ticket #381), and I am 
> not sure how to fix this bug.
> 
>     David

Empty input to an algorithm can often be handled naturally by empty 
matrices in the implementation. Quite often I find that if I've coded 
things right, the boundary empty input case is handled naturally in this 
way. I would prefer that no functions crashed when passed empty matrices.

Just my 2 cents,
John.




More information about the NumPy-Discussion mailing list