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

NumPy Trac numpy-tickets@scipy....
Fri Jul 1 21:13:09 CDT 2011

#1890: piecewise throws TypeError for int input and sin
  Reporter:  deil     |       Owner:  somebody   
      Type:  defect   |      Status:  closed     
  Priority:  normal   |   Milestone:  Unscheduled
 Component:  Other    |     Version:  1.6.0      
Resolution:  invalid  |    Keywords:             
Changes (by charris):

  * status:  new => closed
  * resolution:  => invalid


 It's a good idea if you suspect you don't understand. However, I think
 your example of casting inconsistency should also posted on the list; the
 error raised during the assignment should be consistent. The choice to
 raise an error in the first place is a design decision, and I think fairly
 recent, but probably a good thing as having floats silently cast to
 integers is asking for unnoticed bugs. And it does need to be cast since
 the lhs type is fixed and a new array is not dynamically allocated.

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

More information about the NumPy-Tickets mailing list