sage: a=(QQ^3).subspace([[1,0,1]])
sage: b=a.basis()[0]
sage: b.change_ring(SR)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/grout/sage/devel/sage-main/sage/modules/<ipython console> in <module>()
/home/grout/sage/devel/sage-main/sage/modules/free_module_element.pyx in sage.modules.free_module_element.FreeModuleElement.change_ring (sage/modules/free_module_element.c:3583)()
407 if P.base_ring() is R:
408 return self
--> 409 return P.change_ring(R)(self)
410
411 def additive_order(self):
/home/grout/sage/local/lib/python2.5/site-packages/sage/modules/free_module.py in change_ring(self, R)
4406 return M.span_of_basis(B)
4407 else:
-> 4408 return M.span(B)
4409
4410 def coordinate_vector(self, v, check=True):
/home/grout/sage/local/lib/python2.5/site-packages/sage/modules/free_module.py in span(self, gens, base_ring, check, already_echelonized)
2571 if base_ring is None or base_ring == self.base_ring():
2572 return FreeModule_submodule_field(
-> 2573 self.ambient_module(), gens=gens, check=check, already_echelonized=already_echelonized)
2574 else:
2575 try:
/home/grout/sage/local/lib/python2.5/site-packages/sage/modules/free_module.py in __init__(self, ambient, gens, check, already_echelonized)
4857 raise TypeError, "Argument gens (= %s) must be a list, tuple, or sequence."%gens
4858 FreeModule_submodule_with_basis_field.__init__(self, ambient, basis=gens, check=check,
-> 4859 echelonize=not already_echelonized, already_echelonized=already_echelonized)
4860
4861 def _repr_(self):
/home/grout/sage/local/lib/python2.5/site-packages/sage/modules/free_module.py in __init__(self, ambient, basis, check, echelonize, echelonized_basis, already_echelonized)
4683 FreeModule_submodule_with_basis_pid.__init__(
4684 self, ambient, basis=basis, check=check, echelonize=echelonize,
-> 4685 echelonized_basis=echelonized_basis, already_echelonized=already_echelonized)
4686
4687 def _repr_(self):
/home/grout/sage/local/lib/python2.5/site-packages/sage/modules/free_module.py in __init__(self, ambient, basis, check, echelonize, echelonized_basis, already_echelonized)
3745
3746 if echelonize and not already_echelonized:
-> 3747 basis = self._echelonized_basis(ambient, basis)
3748
3749 FreeModule_generic.__init__(self, R, rank=len(basis), degree=ambient.degree(), sparse=ambient.is_sparse())
/home/grout/sage/local/lib/python2.5/site-packages/sage/modules/free_module.py in _echelonized_basis(self, ambient, basis)
4794 E = A.echelon_form()
4795 # Return the first rank rows (i.e., the nonzero rows).
-> 4796 return E.rows()[:E.rank()]
4797
4798 def is_ambient(self):
TypeError: slice indices must be integers or None or have an __index__ method
Attached patch fixes this problem