#10513: Coercion and category framework for modules
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner: robertwb
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: coercion | Resolution:
Keywords: coercion, | Merged in:
category framework, modules | Reviewers:
Authors: Simon King, Peter | Work issues: fix pickling problem
Bruin | Commit:
Report Upstream: N/A | ed6bbf1bf478d40fe467d2f56bc58b0ad482a840
Branch: | Stopgaps:
u/pbruin/10513-coercion_and_categories_for_modules|
Dependencies: #16507 |
-------------------------------------+-------------------------------------
Changes (by pbruin):
* status: needs_review => needs_work
* work_issues: => fix pickling problem
Comment:
After merging with 6.5.beta3 (which `git` does automatically, despite Trac
being unable to auto-merge), there is one failing doctest:
{{{
File "src/sage/modules/free_module.py", line 6074, in
sage.modules.free_module.FreeModule_submodule_with_basis_field
Failed example:
TestSuite(W).run()
Expected nothing
Got:
Failure in _test_pickling:
Traceback (most recent call last):
File "/home/bruinpj/src/sage/local/lib/python2.7/site-
packages/sage/misc/sage_unittest.py", line 282, in run
test_method(tester = tester)
File "sage/structure/sage_object.pyx", line 543, in
sage.structure.sage_object.SageObject._test_pickling
(build/cythonized/sage/structure/sage_object.c:4553)
tester.assertEqual(loads(dumps(self)), self)
File "/home/bruinpj/src/sage/local/lib/python/unittest/case.py",
line 513, in assertEqual
assertion_func(first, second, msg=msg)
File "/home/bruinpj/src/sage/local/lib/python/unittest/case.py",
line 506, in _baseAssertEqual
raise self.failureException(msg)
AssertionError: Vector space of degree 3 and dimension 1 over Fraction
Field of Univariate Polynomial Ring in x over Rational Field
User basis matrix:
[1 1 x] != Vector space of degree 3 and dimension 1 over Fraction
Field of Univariate Polynomial Ring in x over Rational Field
User basis matrix:
[1 1 x]
------------------------------------------------------------
The following tests failed: _test_pickling
}}}
This is due to the cached `echelonized_basis_matrix` behaving badly under
pickling:
{{{
sage: K.<x> = FractionField(QQ['x'])
sage: M = K^3
sage: W = M.span_of_basis([[1, 1, x]])
sage: W.echelonized_basis_matrix()
[1 1 x]
sage: s = dumps(W)
sage: V = loads(s)
sage: V.echelonized_basis_matrix()
[1, 1, x]
sage: type(_)
<type 'list'>
}}}
There does not seem to be any such problem with `basis_matrix()`:
{{{
sage: W.basis_matrix()
[1 1 x]
sage: V.basis_matrix()
[1 1 x]
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/10513#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.