Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2345 closed defect (fixed)

[with patch, with positive review] negative indicies in vectors

Reported by: mhansen Owned by: mhansen
Priority: major Milestone: sage-2.10.3
Component: linear algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

sage: vector(RR,range(3))[2]
 2.00000000000000

sage: vector(RR,range(3))[-1]
----------------------------------------------------

/home/dfdeshom/custom/sage/devel/sage-gcd2/<ipython
console> in <module>()

/home/dfdeshom/custom/sage/devel/sage-gcd2/free_modu
le_element.pyx in sage.modules.free_module_element.F
reeModuleElement_generic_dense.__getitem__()

<type 'exceptions.IndexError'>: index (i=-1) must be
 between 0 and 2

Attachments (1)

2345.patch (9.0 KB) - added by mhansen 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by mhansen

comment:1 Changed 14 years ago by mhansen

  • Owner changed from was to mhansen
  • Status changed from new to assigned
  • Summary changed from negative indicies in vectors to [with patch, needs review] negative indicies in vectors

comment:2 Changed 14 years ago by dfdeshom

  • Summary changed from [with patch, needs review] negative indicies in vectors to [with patch, with positive review] negative indicies in vectors

The patch looks great, thanks!

comment:3 Changed 14 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from assigned to closed

There was a long discussion about it and in the end the patch was voted in in the thread:

https://groups.google.com/group/sage-devel/browse_thread/thread/0aadcca5557ea45a/80148bb28bec02d1#80148bb28bec02d1

Cheers,

Michael

comment:4 Changed 14 years ago by mhansen

Merged in 2.10.3.rc1.

Note: See TracTickets for help on using tickets.