[SciPy-User] What "Array" means

Sturla Molden sturla at molden.no
Mon Apr 11 14:56:53 EDT 2011


Den 11.04.2011 15:29, skrev Bruce Southey:
> Where did you get your 'count' function from? That is, what type of
> array is 'a'?

These are excepts from scipy/stats/mstats_basic.py

The count attribute belongs to masked arrays. _chk_asarray returns a 
masked array (which has a count method) or an ndarray (which does not), 
hence one of the bugs.

> Consequently the outcome is obvious and one that has been said many
> times before because _chk_asarray either uses np.ravel() or
> np.asarray().

It uses neither.


Sturla




More information about the SciPy-User mailing list