1 | initial version |
Another approach, maybe more along the lines you were thinking:
sage: gen=VectorSpace(GF(29),9)
sage: basis = []
sage: while len(basis) < gen.dimension():
....: v = gen.random_element()
....: if not gen.linear_dependence(basis + [v]):
....: basis.append(v)
....: