[Numpy-discussion] 1.2 tasks

David Huard david.huard at gmail.com
Tue Aug 5 11:48:10 EDT 2008


On Tue, Aug 5, 2008 at 4:04 AM, Vincent Schut <schut at sarvision.nl> wrote:

> David Huard wrote:
> >
> >
> > On Mon, Aug 4, 2008 at 1:45 PM, Jarrod Millman <millman at berkeley.edu
> > <mailto:millman at berkeley.edu>> wrote:
>
> > <snip>
>
> > Question: Should histogram raise a warning by default (new=True) to warn
> > users that the behaviour has changed ? Or warn only if new=False to
> > remind that
> > the old behaviour will be deprecated in 1.3 ?  I think that users will
> > prefer being annoyed at warnings than surprised by an unexpected change,
> > but repeated warnings
> > can become a nuisance.
> >
> > To minimize annoyance, we could also offer three possibilities:
> >
> > new=None (default) : Equivalent to True, print warning about change.
> > new=True : Don't print warning.
> > new=False : Print warning about future deprecation.
> >
> > So those who have already set new=True don't get warnings, and all
> > others are warned. Feedback ?
>
> As a regular user of histogram I say: please warn! Your proposal above
> seems OK to me. I do have histogram in a lot of kind of old (and
> sometimes long-running) code of mine, and I certainly would prefer to be
> warned.
>
> Vincent.


Thanks for the feedback. Here is what will be printed:

If new=False

The original semantics of histogram is scheduled to be
deprecated in NumPy 1.3. The new semantics fixes
long-standing issues with outliers handling. The main
changes concern
1. the definition of the bin edges,
    now including the rightmost edge, and
2. the handling of upper outliers,
    now ignored rather than tallied in the rightmost bin.

Please read the docstring for more information.



If new=None  (default)

The semantics of histogram has been modified in
the current release to fix long-standing issues with
outliers handling. The main changes concern
1. the definition of the bin edges,
   now including the rightmost edge, and
2. the handling of upper outliers, now ignored rather
   than tallied in the rightmost bin.
The previous behaviour is still accessible using
`new=False`, but is scheduled to be deprecated in the
next release (1.3).

*This warning will not printed in the 1.3 release.*

Please read the docstring for more information.


I modified the docstring to put the emphasis on the new semantics,
adapted the tests and updated the ticket.

David



>
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080805/12e0ff1c/attachment.html>


More information about the NumPy-Discussion mailing list