#13836: Fix variable dependence in PiecewisePolynomial
----------------------------------------------+-----------------------------
       Reporter:  christiankuper              |         Owner:  burcin       
           Type:  defect                      |        Status:  needs_work   
       Priority:  major                       |     Milestone:  sage-5.8     
      Component:  symbolics                   |    Resolution:               
       Keywords:  Piecewise, critical_points  |   Work issues:               
Report Upstream:  N/A                         |     Reviewers:  Burcin Erocal
        Authors:  Andrew Fleckenstein         |     Merged in:               
   Dependencies:                              |      Stopgaps:               
----------------------------------------------+-----------------------------

Comment (by christiankuper):

 Hello Andrew,

 finally found the time to study this patch again. Meanwhile I updated to
 5.7 and could not reproduce the error I reported. However, two new ones
 popped up, although the second one IMHO is just related to me not having
 build the complete doc.

 {{{
 The following tests failed:


         sage -t  --long -force_lib
 "devel/sage/doc/en/constructions/calculus.rst"
         sage -t  --long -force_lib "devel/sage/sage/misc/sagedoc.py"
 }}}

 The details from the log file:

 {{{
 sage -t  --long -force_lib "devel/sage/doc/en/constructions/calculus.rst"
 **********************************************************************
 File "/opt/sage-dev3/devel/sage/doc/en/constructions/calculus.rst", line
 377:
     sage: f.fourier_series_partial_sum(3,pi)
 Exception raised:
     Traceback (most recent call last):
       File "/opt/sage-dev3/local/bin/ncadoctest.py", line 1231, in
 run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/opt/sage-dev3/local/bin/sagedoctest.py", line 38, in
 run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/opt/sage-dev3/local/bin/ncadoctest.py", line 1172, in
 run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_16[7]>", line 1, in <module>
         f.fourier_series_partial_sum(Integer(3),pi)###line 377:
     sage: f.fourier_series_partial_sum(3,pi)
       File "/opt/sage-dev3/local/lib/python/site-
 packages/sage/functions/piecewise.py", line 1192, in
 fourier_series_partial_sum
         return self._fourier_series_helper(N, L, lambda n: 1)
       File "/opt/sage-dev3/local/lib/python/site-
 packages/sage/functions/piecewise.py", line 1161, in
 _fourier_series_helper
         x = self.default_variable()
       File "/opt/sage-dev3/local/lib/python/site-
 packages/sage/functions/piecewise.py", line 719, in default_variable
         fun = SR(fun)
       File "parent.pyx", line 834, in
 sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7415)
       File "coerce_maps.pyx", line 82, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (sage/structure/coerce_maps.c:3583)
       File "coerce_maps.pyx", line 77, in
 sage.structure.coerce_maps.DefaultConvertMap_unique._call_
 (sage/structure/coerce_maps.c:3485)
       File "ring.pyx", line 284, in
 sage.symbolic.ring.SymbolicRing._element_constructor_
 (sage/symbolic/ring.cpp:4879)
     TypeError
 }}}

 I believe that the error is caused by the fact that
 piecewise.default_variable() raises a TypeError when lambda functions are
 used (the example in calculus.rst uses lambda functions). Correct me if I
 am worng but I don't think this is related to anything you changed in
 piecewise.

 So I do not know whether this patch can be set to positive review or
 whether that bug needs to be fixed first.

 Christian

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13836#comment:24>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to