[Numpy-discussion] Scipy dot

Dag Sverre Seljebotn d.s.seljebotn@astro.uio...
Thu Nov 8 06:12:08 CST 2012


On 11/08/2012 01:07 PM, Gael Varoquaux wrote:
> On Thu, Nov 08, 2012 at 11:28:21AM +0000, Nathaniel Smith wrote:
>> I think everyone would be very happy to see numpy.dot modified to do
>> this automatically. But adding a scipy.dot IMHO would be fixing things
>> in the wrong place and just create extra confusion.
>
> I am not sure I agree: numpy is often compiled without lapack support, as
> it is not necessary. On the other hand scipy is always compiled with
> lapack. Thus this makes more sens in scipy.

Well, numpy.dot already contains multiple fallback cases for when it is 
compiled with BLAS and not. So I'm +1 on just making this an improvement 
on numpy.dot. I don't think there's a time when you would not want to 
use this (provided the output order issue is fixed), and it doesn't make 
sense to not have old codes take advantage of the speed improvement.

BTW, something this doesn't fix is that you still have to do 
"np.dot(x.conjugate().t, x)" in the complex case which needlessly copies 
the data since LAPACK can do the conjugation.

DS

>
>> Is it possible to avoid changing the default output order from C to F?
>
> +1
>
> G
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



More information about the NumPy-Discussion mailing list