[NumPy-Tickets] [NumPy] #1890: piecewise throws TypeError for int input and sin

NumPy Trac numpy-tickets@scipy....
Fri Jul 1 17:37:25 CDT 2011


#1890: piecewise throws TypeError for int input and sin
--------------------+-------------------------------------------------------
 Reporter:  deil    |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  1.6.0      
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by charris):

 The problem is this line

 y = zeros(x.shape, x.dtype)

 y should probably have a type compatible with all the outputs, which means
 running the functions before splicing them together for the output. The
 stricter casting rules are catching this, and I think that is a good
 thing.


      Is this a bug?


 Looks like it. Or a least a defect.

 Chuck

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


More information about the NumPy-Tickets mailing list