From: Andrew S. <str...@as...> - 2006-03-19 20:14:21
|
Darren Dale wrote: >For backend_ps, we want to make use of the transform's numerix methods. > > if transform.need_nonlinear(): > x,y,mask = transform.nonlinear_only_numerix(x, y, returnMask=1) > else: > mask = ones(x.shape) > x,y = transform.numerix_x_y(x, y) > >If I do semilogy([0,1,2,3]), the mask will be [0,1,1,1]. If I do >semilogy([1,2,nan,4]), I would have expected a mask that looked like >[1,1,0,1], but it returns [1,1,1,1]. > I just committed a patch that should make this work. nan support is done in a case-by-case basis at the C level. So this is another case. >Wouldnt it make life easy if >transform.nonlinear_only_numerix and transform.numerix_x_y both returned a >mask with zeros where x or y is a nan or inf? > I'm not sure this is the right thing to do for inf (or -inf) -- I can imagine transforms that accept inf and return something useful (such as a reciprocal transform). Maybe we don't use any such transforms currently, but that doesn't mean we should prevent that case in the future. Is the inf case important for you? Cheers! Andrew |