#10489: plot_slope_field broken
------------------------------------------------------+---------------------
   Reporter:  ManDay                                  |          Owner:  jason, 
was                      
       Type:  enhancement                             |         Status:  
positive_review                 
   Priority:  major                                   |      Milestone:  
sage-4.8                        
  Component:  graphics                                |       Keywords:  
plot_slope_field beginner sd35.5
Work_issues:                                          |       Upstream:  N/A    
                         
   Reviewer:  Aly Deines, Ryan Grout, Benjamin Jones  |         Author:         
                         
     Merged:                                          |   Dependencies:         
                         
------------------------------------------------------+---------------------
Changes (by benjaminfjones):

  * status:  needs_review => positive_review
  * reviewer:  Aly Deines, Ryan Grout => Aly Deines, Ryan Grout, Benjamin
               Jones


Old description:

> '''plot_slope_field( lambda x,y: x+y,(x,-3,4),(y,-2,2) );'''
>
> results in
>

> {{{
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "_sage_input_15.py", line 10, in <module>
>     exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
> -*-\\n" +
> _support_.preparse_worksheet_cell(base64.b64decode("cGxvdF9zbG9wZV9maWVsZCggbGFtYmRhIHgseTogeCt5LCh4LC0zLDQpLCh5LC0yLDIpICk7"),globals())+"\\n");
> execfile(os.path.abspath("___code___.py"))
>   File "", line 1, in <module>
>
>   File "/tmp/tmp639i0K/___code___.py", line 3, in <module>
>     exec compile(u'plot_slope_field( lambda x,y: x+y,(x,-_sage_const_3
> ,_sage_const_4 ),(y,-_sage_const_2 ,_sage_const_2 ) );
>   File "", line 1, in <module>
>
>   File "/homes/sageserv/sage-4.5.1-Solaris_10_SPARC/local/lib/python2.6
> /site-packages/sage/plot/plot_field.py", line 220, in plot_slope_field
>     norm = sqrt((f**2+1))
> TypeError: unsupported operand type(s) for ** or pow(): 'function' and
> 'int'
> }}}

New description:

 '''plot_slope_field( lambda x,y: x+y,(x,-3,4),(y,-2,2) );'''

 results in


 {{{
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "_sage_input_15.py", line 10, in <module>
     exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
 -*-\\n" +
 
_support_.preparse_worksheet_cell(base64.b64decode("cGxvdF9zbG9wZV9maWVsZCggbGFtYmRhIHgseTogeCt5LCh4LC0zLDQpLCh5LC0yLDIpICk7"),globals())+"\\n");
 execfile(os.path.abspath("___code___.py"))
   File "", line 1, in <module>

   File "/tmp/tmp639i0K/___code___.py", line 3, in <module>
     exec compile(u'plot_slope_field( lambda x,y: x+y,(x,-_sage_const_3
 ,_sage_const_4 ),(y,-_sage_const_2 ,_sage_const_2 ) );
   File "", line 1, in <module>

   File "/homes/sageserv/sage-4.5.1-Solaris_10_SPARC/local/lib/python2.6
 /site-packages/sage/plot/plot_field.py", line 220, in plot_slope_field
     norm = sqrt((f**2+1))
 TypeError: unsupported operand type(s) for ** or pow(): 'function' and
 'int'
 }}}

 -----

 To release manager:
  * apply [[trac-10489-slope-field-lambda-4-7-3.patch trac-10489-slope-
 field-lambda-4-7-3.patch]] to the Sage library

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10489#comment:16>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to