Re: [sage-devel] floor division for integer matrices

2017-11-02 Thread Thierry
Hi, if you want to make explicit that you apply the operation to each entry, you can still do: sage: A = Matrix(ZZ,2,[3,3,3,3]) sage: A.apply_map(lambda x:x//3) [1 1] [1 1] sage: _.parent() Full MatrixSpace of 2 by 2 dense matrices over Integer Ring This method works for many things, that migh

Re: [sage-devel] floor division for integer matrices

2017-11-01 Thread David Roe
I don't think you're missing anything, and I would support adding this feature to matrices. David On Wed, Nov 1, 2017 at 5:36 PM, Simon Brandhorst wrote: > sage: A = Matrix(ZZ,2,[3,3,3,3]) > sage: A > [3 3] > [3 3] > sage: A//3 > > ---

[sage-devel] floor division for integer matrices

2017-11-01 Thread Simon Brandhorst
sage: A = Matrix(ZZ,2,[3,3,3,3]) sage: A [3 3] [3 3] sage: A//3 --- TypeError Traceback (most recent call last) ... TypeError: unsupported operand parent(s) for //: 'Full MatrixSpace of 2 by 2