[SciPy-user] addition of vectors of different lengths

Travis Oliphant oliphant at ee.byu.edu
Wed Aug 3 12:52:07 CDT 2005


>As a general question, I wonder if it would be reasonable to allow
>ufuncs to be applied to arrays of different sizes.  When one of the
>arrays is missing data, the ufunc could be given None for that
>argument, and decide whether to raise an exception or to use a default
>value.  Is this something that was thought about but not done for 
>some reason?
>  
>
I have not been following this entire discussion, but this kind of 
behavior would markedly change the current rules and make ufuncs slower 
in general.  

Now, I suppose instead of raising a shape-mismatch error an alternative 
algorithm could be called, that would fix the speed problem, but it 
would still mean that unintentional shape mismatch bugs would be hard to 
catch.

It's an interesting propostion though.

-Travis





More information about the SciPy-user mailing list