[Numpy-discussion] Scipy dot

Nathaniel Smith njs at pobox.com
Fri Nov 9 10:12:42 EST 2012


On 9 Nov 2012 08:48, "Gael Varoquaux" <gael.varoquaux at normalesup.org> wrote:
>
> On Thu, Nov 08, 2012 at 11:29:19AM -0600, Anthony Scopatz wrote:
> >     Indeed, there is no reason not to make this available in NumPy.
>
> > +1, I agree, this should be a fix in numpy, not scipy.
>
> I agree.
>
> My point was a bit of a side issue: given a user's computer, I have no
> garantee that numpy will be compiled with an optimized blas. In fact, I
> have often seen on computing clusters where people tend to compile stuff
> manually numpy using the embedded lapack_lite. On the other hand, scipy
> is necessarily compiled using a blas. This is why, as a developer, I
> always write code that uses scipy.linalg rather than numpy.linalg.
> However, for 'dot', I have no way of ensuring that the blas used to
> compile scipy is used.

But what if someone compiles numpy against an optimized blas (mkl,
say) and then compiles SciPy against the reference blas? What do you
do then!? ;-)

I mean, this would be dumb. But not really dumber than installing an
optimized blas for SciPy and then configuring numpy to *not* use it...

As a higher-level point, having a scipy.dot would be a serious
violation of There's Only One Way To Do It. I think that if people who
are writing code against numpy/scipy have to care about our
difficulties with build systems, then that's a bug in numpy/scipy and
we should do a better job rather than pushing the responsibility off
on our users to figure out the best combination of functions to use on
each end-user's machine.

(Honestly I feel that the existence of scipy.linalg in the first place
is sort of a low-level embarrassment that we should try to move away
from in the long run. At least as far as the public API goes, and for
all of the near-duplicate functions that are in both numpy and scipy,
like qr.)

-n

> Cheers,
>
> Gaël
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list