Opened 13 years ago

Closed 13 years ago

#2542 closed enhancement (fixed)

[with patch, positive review] implement right_kernel() and right_nullity() for matrices

Reported by: AlexGhitza Owned by: was
Priority: minor Milestone: sage-2.10.4
Component: linear algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

I implemented right_kernel() and right_nullity() for matrices in the simplest possible way (calling the left_ functions on the transpose of self). This is a tiny little step in the direction of #1607.

Attachments (2)

right_kernel.patch (7.4 KB) - added by AlexGhitza 13 years ago.
2542-2.patch (7.6 KB) - added by mhansen 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by AlexGhitza

Changed 13 years ago by mhansen

comment:1 Changed 13 years ago by mhansen

  • Summary changed from [with patch, needs review] implement right_kernel() and right_nullity() for matrices to [with patch, positive review] implement right_kernel() and right_nullity() for matrices

Looks good to me. Apply 2542-2.patch which is rebased against 2.10.4.alpha0.

comment:2 Changed 13 years ago by mabshoff

  • Summary changed from [with patch, positive review] implement right_kernel() and right_nullity() for matrices to [with patch, positive review, pending doctest fix] implement right_kernel() and right_nullity() for matrices

This patch causes a doctest failure for me:

sage -t -long devel/sage/sage/matrix/matrix2.pyx
**********************************************************************
File "matrix2.pyx", line 1170:
    sage: A.right_nullity()
Expected:
    1
Got:
    0
**********************************************************************
1 items had failures:
   1 of   4 in __main__.example_26
***Test Failed*** 1 failures.
For whitespace errors, see the file .doctest_matrix2.pyx

Cheers,

Michael

comment:3 Changed 13 years ago by mabshoff

  • Summary changed from [with patch, positive review, pending doctest fix] implement right_kernel() and right_nullity() for matrices to [with patch, positive review] implement right_kernel() and right_nullity() for matrices
[06:34] <mhansen> mabshoff: For 2542, the doctest is wrong and the answer returned is correct.

Cheers,

Michael

comment:4 Changed 13 years ago by mabshoff

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

Merged 2542-2.patch with corrected doctest in Sage 2.10.4.rc0

Note: See TracTickets for help on using tickets.