[Numpy-discussion] index objects are not broadcastable to a single shape

Simon Burton simon at arrowtheory.com
Wed Apr 12 20:34:04 CDT 2006

On Wed, 12 Apr 2006 19:29:10 -0600
Travis Oliphant <oliphant at ee.byu.edu> wrote:

> The problem with these error messages is that some code is used in a 
> wide-variety of circumstances.  The original error message was conceived 
> in thinking about the application of the code to one circumstance while 
> this particular error is occurring in a different one.
> The standard behavior is to just propagate the error up.  Better error 
> messages means catching a lot more errors and special-casing error 
> messages.  It can be done, but it's tedious work.

OK. Can the error message be a little more generic, longer, etc. ?

"shape mismatch (index objects are not broadcastable to a single shape)" ?

I don't know either. I'm just thinking about all the new numpy/python users at work
here that I will need to hand hold. Error messages like this are pretty scary.


Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Ph. 61 02 6249 6940

More information about the Numpy-discussion mailing list