1 | initial version |
Another option:
sage: V = QQ^10
sage: d = 0
sage: while dim(V) > 0:
....: for x in V: # iterate through all elements of V
....: if x: # until you find a nonzero element
....: break
....: d += 1
....: V = V / V.span([x])
....:
sage: d
3
2 | No.2 Revision |
Another option:
sage: V = QQ^10
sage: d = 0
sage: while dim(V) > 0:
....: for x in V: # iterate through all elements of V
....: if x: # until you find a nonzero element
....: break
....: d += 1
....: V = V / V.span([x])
....:
sage: d
3
10