[Numpy-tickets] [NumPy] #441: numpy from iter taking shape rather than count

NumPy numpy-tickets@scipy....
Wed Jan 31 22:41:53 CST 2007


#441: numpy from iter taking shape rather than count
-------------------------+--------------------------------------------------
 Reporter:  tdennist     |        Owner:  somebody
     Type:  enhancement  |       Status:  new     
 Priority:  normal       |    Milestone:          
Component:  Other        |      Version:          
 Severity:  normal       |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by rkern):

 It may be confusing. A user might expect that the iterator {{{itr}}} in
 the following:

 {{{
 a = fromiter(itr, mydtype, shape=(m, n))
 }}}

 should yield {{{m}}} sequences of length {{{n}}} each.

 What you want is easily (and unambiguously) achievable with

 {{{
 a = fromiter(itr, mydtype).reshape((m, n))
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/441#comment:1>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list