| 1 | initial version |
Alternatively, you can use the Matrix constructor:
sage: s = (a,b,c)
sage: Matrix(ZZ, 3, lambda i, j: v[i].coeff(s[j]))
[ 1 -1 0]
[ 0 1 -1]
[-1 0 1]
| 2 | No.2 Revision |
Alternatively, you can use the Matrix constructor:
sage: s = (a,b,c)
var("a b c")
sage: v = vector([a-b, b-c, c-a])
sage: Matrix(QQ, [v.derivative(x) for x in (a,b,c)]).T
[ 1 -1 0]
[ 0 1 -1]
[-1 0 1]
sage: Matrix(ZZ, 3, lambda i, j: v[i].coeff(s[j]))
[ 1 -1 0]
[ 0 1 -1]
[-1 0 1]
etc., depending on your v. I can't seem to find a Sage-side function which'll just do it.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.