[NumPy-Tickets] [NumPy] #1943: numpy.frombuffer fails when given an empty buffer

NumPy Trac numpy-tickets@scipy....
Mon Sep 19 07:46:28 CDT 2011


#1943: numpy.frombuffer fails when given an empty buffer
---------------------+------------------------------------------------------
 Reporter:  hniksic  |       Owner:  somebody    
     Type:  defect   |      Status:  needs_review
 Priority:  normal   |   Milestone:  Unscheduled 
Component:  Other    |     Version:  1.5.1       
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by hniksic):

  * status:  new => needs_review


Comment:

 The provided attachment contains a patch that fixes the reported problem
 and applies to the current master (aded70c4d02). After applying the patch,
 numpy.frombuffer works on empty buffers or empty portions thereof:

 {{{
 >>> import numpy, array
 >>> numpy.frombuffer(array.array('d'))
 array([], dtype=float64)
 }}}

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


More information about the NumPy-Tickets mailing list