Opened 16 years ago

Closed 15 years ago

#405 closed enhancement (fixed)

[with patch, positive referee] add setting of rows or columns to a matrix

Reported by: was Owned by: mhansen
Priority: minor Milestone: sage-2.9.1
Component: linear algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

On 7/26/07, David Joyner <wdjoyner@gmail.com> wrote:
> On 7/26/07, mak <mak@math.uvic.ca> wrote:
> > 1.  How do I change the entire row or column of a matrix at once?  In
> > pari, I could do e.g. a=[1,2,3;4,5,6], and then put a[1,]=[0,0,0],
> > which would give a=[0,0,0;4,5,6].  What's the sage equivalent?

There is no SAGE equivalent yet.  David's example might be helpful
below though.  The best you could in SAGE is set each entry
one at a time right now.  I should add something.  

def set_row(A, r, v):
    for i in range(A.ncols()):
         A[r, i] = v[i]

I'm not sure how we forgot to ever do this. 

Attachments (1)

405.patch (2.5 KB) - added by mhansen 15 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 16 years ago by was

Component: algebraic geometrylinear algebra
Priority: majorminor

comment:2 Changed 15 years ago by mabshoff

Milestone: Sage-2.10

comment:3 Changed 15 years ago by mabshoff

Milestone: sage-2.11sage-2.9.1

Changed 15 years ago by mhansen

Attachment: 405.patch added

comment:4 Changed 15 years ago by mhansen

Owner: changed from was to mhansen
Status: newassigned
Summary: add setting of rows or columns to a matrix[with patch] add setting of rows or columns to a matrix

comment:5 Changed 15 years ago by rlm

Resolution: fixed
Status: assignedclosed
Summary: [with patch] add setting of rows or columns to a matrix[with patch, positive referee] add setting of rows or columns to a matrix

merged in 2.9.1 rc0

Note: See TracTickets for help on using tickets.