[Scipy-tickets] [SciPy] #1537: scipy circmean exception when using non-flattened array

SciPy Trac scipy-tickets@scipy....
Tue Oct 11 19:32:34 CDT 2011


#1537: scipy circmean exception when using non-flattened array
---------------------------------+------------------------------------------
 Reporter:  pfctdayelise         |       Owner:  somebody   
     Type:  defect               |      Status:  new        
 Priority:  normal               |   Milestone:  Unscheduled
Component:  scipy.stats          |     Version:  0.9.0      
 Keywords:  circmean, morestats  |  
---------------------------------+------------------------------------------

Comment(by pfctdayelise):

 But it is specifying axis=0 when calling a numpy method - np.mean. I am
 not really sure how numpy/scipy interact but anyway, I found the exception
 goes away (and an appropriate result is returned) if I remove the axis=0
 bit and let it use the default axis=None.

 I agree that it's a concern, but it seems a separate issue, that circmean
 is not under test coverage and has little documentation. (
 http://projects.scipy.org/scipy/ticket/1027 and
 http://projects.scipy.org/scipy/ticket/174 )

 Circular mean seems to be pretty tricky and I get the impression there is
 no single correct method, it depends on what "correct" means to you. Some
 links I have saved:

 http://www.webmet.com/met_monitoring/621.html

 http://stackoverflow.com/questions/491738/how-do-you-calculate-the-
 average-of-a-set-of-angles

 http://en.wikipedia.org/wiki/Mean_of_circular_quantities


 But regardless, I think we can agree that the method shouldn't raise an
 exception if you pass in a proper array. :)

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1537#comment:4>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list