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
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: 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