From: Perry G. <pe...@st...> - 2004-12-21 18:30:46
|
On Dec 21, 2004, at 1:02 PM, Xavier Gnata wrote: > > Hi, > > Please consider this code in colors.py (from 546) : > if vmin is None or vmax is None: > rval = ravel(val) > if vmin is None: > vmin = min(rval) > if vmax is None: > vmax = max(rval) > > On my computer to be much faster without using rval : > > if vmin is None or vmax is None: > #rval = ravel(val) > if vmin is None: > vmin = val.min() > if vmax is None: > vmax = val.max() > But note that .min and .max are only supported under numarray (I believe). There are a number of things we would like to take advantage of (especially with regard to array indexing) that we can't in matplotlib since the code must work with both Numeric and numarray. Perry |