Re: [sage-devel] matrix constructor signature clash

2015-06-16 Thread Jeroen Demeyer
This is even a more interesting example: sage: f(x,y) = x+y sage: Matrix(2, 2, f) # Matrix over CallableSymbolicExpressionRing [(x, y) |--> x + y (x, y) |--> 0] [(x, y) |--> 0 (x, y) |--> x + y] Here is a proposal (assuming callable(f) is true): if not isinstance(f, RingElement):

[sage-devel] matrix constructor signature clash

2015-06-16 Thread Nils Bruin
Tiebreaker needed: We have a whole bunch of ways in which a matrix can be constructed. Some of the possible signatures we support according to the documentation: A) matrix(n,m, ) which constructs the n x m matrix with entries f(i,j), where i,j run throw the row and column indices. B) matrix