[NumPy-Tickets] [NumPy] #1639: FAIL: test_complex_scalar_warning (test_regression.TestRegression)

NumPy Trac numpy-tickets@scipy....
Sat Oct 16 01:54:27 CDT 2010


#1639: FAIL: test_complex_scalar_warning (test_regression.TestRegression)
----------------------+-----------------------------------------------------
 Reporter:  sienkiew  |       Owner:  pv   
     Type:  defect    |      Status:  new  
 Priority:  normal    |   Milestone:  1.5.1
Component:  Other     |     Version:  1.5.0
 Keywords:            |  
----------------------+-----------------------------------------------------
Changes (by rgommers):

  * owner:  somebody => pv
  * milestone:  2.0.0 => 1.5.1


Comment:

 I see this too on OS X and Python 2.5 (but not on 2.6). This got
 introduced in commit:d82003ba6.

 Q1: the doc for PyErr_WarnEx
 (http://docs.python.org/release/2.6.5/c-api/exceptions.html) says that the
 last int argument should be positive, from the doc it appears this
 argument should be 1, not 0. Or is this because ComplexWarning is defined
 in Python, not C?

 Q2: why is PyErr_Warn not working? The call seems fine. Unless it has to
 do with the above 0/1 difference. And for clarity: the test is fine, the
 warning just does not get emitted:
 {{{
 >>> a = np.cdouble(1+2j)
 >>> float(a)
 1.0
 >>>
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1639#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list