#4972: matrix setitem should deal with slicing
----------------------------+-----------------------------------------------
 Reporter:  jason           |       Owner:  was     
     Type:  defect          |      Status:  new     
 Priority:  major           |   Milestone:  sage-3.3
Component:  linear algebra  |    Keywords:          
----------------------------+-----------------------------------------------
 The following should work:

 {{{
 a=matrix(QQ,3,[1,3,4,3,2,3,6,4,5])
 a[1,:]=a[0,:]
 }}}

 Instead, I get an error:

 {{{


 Traceback (click to the left for traceback)
 ...
 TypeError: 'slice' object cannot be interpreted as an index

 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/grout/.sage/sage_notebook/worksheets/admin/143/code/10.py",
 line 7, in <module>
     a[_sage_const_1 ,:]=a[_sage_const_0 ,:]
   File "/home/grout/sage/local/lib/python2.5/site-
 packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in <module>

   File "matrix0.pyx", line 798, in sage.matrix.matrix0.Matrix.__setitem__
 (sage/matrix/matrix0.c:4517)
 TypeError: 'slice' object cannot be interpreted as an index

 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4972>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to