Ticket #3063 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

[with patch; positive review] empty matrices: norm() returns a ValueError

Reported by: dfdeshom Owned by: was
Priority: major Milestone: sage-3.0.1
Component: linear algebra Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

sage: a = matrix([])

sage: a.norm()
---------------------------------------------------------------------------

<type 'exceptions.ValueError'>: max() arg is an empty sequence

I think the answer in this case should be 0.

Attachments

3063.patch Download (883 bytes) - added by dfdeshom 5 years ago.

Change History

Changed 5 years ago by dfdeshom

comment:1 Changed 5 years ago by dfdeshom

  • Summary changed from empty matrices: norm() returns a ValueError to [with patch; needs review] empty matrices: norm() returns a ValueError

Patch attached.

comment:2 Changed 5 years ago by mhansen

  • Summary changed from [with patch; needs review] empty matrices: norm() returns a ValueError to [with patch; positive review] empty matrices: norm() returns a ValueError

comment:3 Changed 5 years ago by mabshoff

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

Merged in Sage 3.0.1.alpha1

Note: See TracTickets for help on using tickets.