[Numpy-tickets] [NumPy] #402: newaxis incompatible with array indexing

NumPy numpy-tickets@scipy....
Sun Apr 1 20:49:54 CDT 2007


#402: newaxis incompatible with array indexing
--------------------------+-------------------------------------------------
 Reporter:  NeilenMarais  |        Owner:  somebody
     Type:  defect        |       Status:  new     
 Priority:  normal        |    Milestone:          
Component:  Other         |      Version:          
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------
Comment (by charris):

 Looks like fancy indexing is incompatible with newaxis:


 {{{
 In [5]: a = ones(3)

 In [6]: a[1,newaxis,newaxis]
 Out[6]: array([[ 1.]])

 In [7]: a[[1,2],newaxis,newaxis]
 ---------------------------------------------------------------------------
 exceptions.TypeError                                 Traceback (most
 recent call last)

 /home/charris/<ipython console>

 TypeError: an integer is required

 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/402#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