[SciPy-user] Inconsistencies between numpy & scipy corrcoef

Steve Lianoglou lists.steve at arachnedesign.net
Mon Oct 15 17:51:27 EDT 2007


>> Just curious if there's any reason why
>> scipy.stats.corrcoeff and numpy.corrcoef (andy by
>> extension the `cov` functions) act differently, e.g if you
>> are passing both of them a 2d array, scipy will take the
>> rows to be the observations and the cols are the vars,
>> numpy is the opposite.
>
> It is actually worse than this:
> scipy.corrcoef is just numpy.corrcoef,
> but scipy.stats.corrcoef is as you say,
> so SciPy itself contains two conflicting versions.
>
> I agree that this shd match numpy.
> The stats version may need to be deprecated
> or to force an axis argument.

So why not have the scipy methods just call down back the numpy  
methods (or do some import magic in the scipy.stats module to just  
import the numpy funcs into the namespace)?

Since you need numpy before installing scipy, why have duplicate code?

-steve



More information about the SciPy-User mailing list