[NumPy-Tickets] [NumPy] #2073: stride_tricks with float16

NumPy Trac numpy-tickets@scipy....
Mon Mar 12 13:13:46 CDT 2012


#2073: stride_tricks with float16
--------------------+-------------------------------------------------------
 Reporter:  npinto  |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  1.6.1      
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by npinto):

 I was able to nail and reproduce the bug in bug2.py:

 {{{
 % cat bug2.py
 (master⚡)
 import numpy as np

 f2 = np.empty((1), dtype='float16')

 class Foo: pass
 a = Foo()
 a.__array_interface__ = f2.__array_interface__

 np.array(a, 'float16')
 np.array(f2, 'float16')
 }}}

 {{{
 % python ipython_log.py
 Traceback (most recent call last):
   File "ipython_log.py", line 9, in <module>
     np.array(a, 'float16')
 ValueError: unsupported typestring
 }}}

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


More information about the NumPy-Tickets mailing list