[Numpy-discussion] index objects are not broadcastable to a single shape
Travis Oliphant
oliphant.travis at ieee.org
Thu Apr 13 07:58:05 EDT 2006
Simon Burton wrote:
> 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. ?
>
>
Absolutely, I should have finished the above message with an appeal for
more helpful generic messages. All suggestions are welcome.
> "shape mismatch (index objects are not broadcastable to a single shape)" ?
>
Definitely better. I would probably drop the index qualifier as well.
Thanks for the tip.
-Travis
More information about the NumPy-Discussion
mailing list