John Hunter wrote: > On Tue, Aug 5, 2008 at 3:46 PM, Mark Bakker <[EMAIL PROTECTED]> wrote: > >> But if I replace the Inf by a nan: y[2] = np.nan, then it plots fine. >> >> I know, I know, I can do this with masked arrays, but it cannot be that hard >> to make this work correctly, and wouldn't that be much nicer? Desirable? > > The question is: what should happen with inf? Do you know what matlab does?
Matlab ignores it, same as with a nan. This needs a bit of thought and checking. Mike went to some trouble, I believe, to make nans work without running everything through masked arrays--whether this is actually *faster* than doing an initial masking operation when needed and then using masked arrays everywhere internally when bad values are present, I don't know. It is possible that everything could be made to work with infs simply by changing all "isnan(x)" to "~isfinite(x)", which has the advantage of being slightly faster (surprisingly) as well as more general. Eric > > JDH > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users