[NumPy-Tickets] [NumPy] #1492: numpy.random.dirichlet does not check parameters and hangs when invalid

NumPy Trac numpy-tickets@scipy....
Thu May 27 07:08:39 CDT 2010

#1492: numpy.random.dirichlet does not check parameters and hangs when invalid
 Reporter:  JohnReid      |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  normal        |   Milestone:  2.0.0   
Component:  numpy.random  |     Version:          
 Keywords:                |  
 Invalid negative parameters can cause numpy.random.dirichlet to hang and
 never return. Note the last parameter is very small and negative.

 a=numpy.array([  5.64081750e-01,   2.38946208e-02,   8.51495969e-02,
          8.75933900e-02,   8.38591170e-02,   3.42876279e-03,
          2.98989982e-04,   4.41411094e-04,   3.98247752e-06,
          2.10975195e-05,   1.37975897e-07,   1.75958131e-07,
          1.33898931e-07,   2.82288418e-07,   3.14258899e-09,
          8.48688121e-10,   1.84816307e-10,   3.78878308e-11,
          1.41103782e-11,   1.01214380e-11,   6.75038727e-12,
          6.63904489e-12,   5.17487421e-13,   7.07797216e-14,
          7.97992577e-15,   2.43240084e-14,   6.83348954e-15,
          2.15791088e-15,   3.67340489e-15,   1.26240005e-15,
          1.93752302e-17,   4.83345747e-17,   1.65380214e-18,
          1.39628957e-18,   1.42096661e-18,   4.89995717e-19,
          3.53568962e-20,   5.80340121e-20,   1.79688051e-19,

 I'm running numpy 1.3.0 on Ubuntu and the code above just spun at 100% CPU
 without returning.

Ticket URL: <http://projects.scipy.org/numpy/ticket/1492>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list