-
-
Notifications
You must be signed in to change notification settings - Fork 657
Closed
Milestone
Description
In older versions of Sage, extracting a one-column submatrix
of a NumPy matrix could return it as a one-row matrix if using
a Sage integer for the column number:
sage: m = numpy.matrix(numpy.arange(6).reshape(3, 2))
sage: m[:, int(0)] # correct submatrix extraction
matrix([[0],
[2],
[4]])
sage: m[:, Integer(0)] # incorrect submatrix extraction
matrix([[0, 2, 4]])
Current versions of NumPy no longer have this problem.
This ticket adds a doctest to ensure correct submatrix
extraction keeps working.
Upstream: Fixed upstream, in a later stable release.
CC: @jasongrout @mkoeppe @slel
Component: packages: standard
Keywords: numpy
Author: Samuel Lelièvre
Branch/Commit: 290ab73
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/10928