Eric Firing wrote:
> Manuel Metz wrote:
>> Hi,
>>    while adding the step-histogram I learned about the change of 
>> numpy.histogram. As MPL trunk relies in numpy 1.1, I think its a good 
>> idea to switch to the new histogram, i.e. use "new=True". Indeed, this 
>> is required to be able to allow to give bin-edges, which is possible 
>> with MPL 0.91.
>>    However, while keeping API compatibility on the one hand by 
>> allowing to provide bin-edges, this step also breaks API compatibility 
>> since the definition of bins has changed:
>>
>> numpy 1.0.4
>>
>> In [1]:from numpy import *
>> In [2]:random.seed(18)
>> In [3]:x = random.random(100)
>> In [4]:histogram(x, bins=array([0,0.1,0.2]))
>> Out[4]:(array([11, 11, 78]), array([ 0. ,  0.1,  0.2]))
>>
>> numpy 1.1.0.dev5106'
>>
>> In [1]:from numpy import *
>> In [2]:random.seed(18)
>> In [3]:x = random.random(100)
>> In [4]: histogram(x, bins=array([0,0.1,0.2]),new=True)
>> Out[4]: (array([11, 11]), array([ 0. ,  0.1,  0.2]))
>>
>>
>> How should this be handled? Follow numpy, breaking API compatibility 
>> and point to the API change of histogram? Or keeping API compatibility 
>> with MPL0.91 and write a wrapper function?
>>
>> I would prefer the first option...
> 
> I strongly agree.
> 
> Eric
> 

Hi,

so, I just commited the patch and also updated the API_CHANGES file.

Manuel



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to