[Numpy-tickets] [NumPy] #670: cmp_arg_types bug

NumPy numpy-tickets@scipy....
Mon Feb 25 07:16:58 CST 2008

#670: cmp_arg_types bug
 Reporter:  nbecker     |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  high        |   Milestone:  1.0.5   
Component:  numpy.core  |     Version:  none    
 Severity:  normal      |    Keywords:          
 I dont' think the current cmp_arg_types works at all, it doesn't even
 increment the pointers to examine all the types.  I think this is correct:

 static int
 cmp_arg_types(int *arg1, int *arg2, int n)
     for (;n > 0; n--, ++arg1, ++arg2) {
         if (PyArray_EquivTypenums(*arg1, *arg2) ||
             PyArray_CanCastSafely(*arg1, *arg2))
         return 1;
     return 0;

Ticket URL: <http://scipy.org/scipy/numpy/ticket/670>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list