rootpy/rootpy — pull request #454 by ndawe (2013-09-26 08:14:32+00:00)
Title: [MRG] hist: new rebinned method for all rebinning cases and for all dimensions

```python
>>> from rootpy.plotting import Hist
>>> a = Hist(500, -5, 30)
>>> a.FillRandom('landau', 10000000)
>>> a.Draw()
>>> b = a.rebinned(a.quantiles(10, strict=True))
>>> b.SetMinimum(0)
>>> b.Draw()
```

```python
def rebinned(self, bins, axis=0):
"""
Return a new rebinned histogram

Parameters
----------

bins : int, tuple, or iterable
If ``bins`` is an int, then return a histogram that is rebinned by
grouping N=``bins`` bins together along the axis ``axis``.
If ``bins`` is a tuple, then it must contain the same number of
elements as there are dimensions of this histogram and each element
will be used to rebin along the associated axis.
If ``bins`` is another iterable, then it will define the bin
edges along the axis ``axis`` in the new rebinned histogram.

axis : int, optional (default=0)
The axis to rebin along.

Returns
-------

The rebinned histogram

"""
```