[NumPy-Tickets] [NumPy] #1761: Inconsistency with type in scalar operations

NumPy Trac numpy-tickets@scipy....
Tue Mar 8 15:08:46 CST 2011


#1761: Inconsistency with type in scalar operations
----------------------+-----------------------------------------------------
  Reporter:  faltet   |       Owner:  somebody   
      Type:  defect   |      Status:  closed     
  Priority:  normal   |   Milestone:  Unscheduled
 Component:  Other    |     Version:  devel      
Resolution:  wontfix  |    Keywords:             
----------------------+-----------------------------------------------------
Changes (by mwiebe):

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


Comment:

 This is because NumPy bases its fundamental types on the C types instead
 of sized types (something which IMO should be changed). On some 64 bit
 systems, sizeof(long) == sizeof(long long), and the thing to check is the
 type number. (7 is NPY_LONG, 9 is NPY_LONGLONG). In 1.6:

 {{{
 >>> r1.dtype.num
 9
 >>> r2.dtype.num
 7
 >>> r1.dtype == r2.dtype
 True
 }}}

 In 1.6, because the result type of a+b should always be the same as b+a,
 at least it's behaving a bit more consistently even if its still weird.

 I'm marking this as wontfix, since to properly fix this in all possible
 cases requires changing the types enumeration which deserves its own bug.
 Is it breaking any specific code for you?

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


More information about the NumPy-Tickets mailing list