[SciPy-user] Inconsistencies between numpy & scipy corrcoef

Alan G Isaac aisaac at american.edu
Mon Oct 15 17:26:42 EDT 2007


On Mon, 15 Oct 2007, Steve Lianoglou apparently wrote:
> 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.

Cheers,
Alan Isaac






More information about the SciPy-User mailing list