Opened 10 years ago

Closed 10 years ago

#11209 closed defect (fixed)

documentation for symbolic series function is wrong/misleading

Reported by: was Owned by: burcin
Priority: minor Milestone: sage-4.7
Component: symbolics Keywords:
Cc: Merged in: sage-4.7.rc1
Authors: William Stein Reviewers: Burcin Erocal, Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Consider:

sage: f(x) = log(x)
sage: f.series?
Definition:     f.series(self, symbol, order)
Docstring:
    
       Return the power series expansion of self in terms of the variable
       symbol to the given order.
    
       INPUT:
    
       INPUT:
    
       * ``symbol`` - a variable
    
       * ``order`` - an integer
    
       OUTPUT:
    
       * a power series
    
       To truncate the power series and obtain a normal expression, use
       the truncate command.
    
       EXAMPLES:
    
       We expand a polynomial in x about 0, about 1, and also truncate it
       back to a polynomial:
    
          sage: g = f.series(x, 4); g
          3 + (-5)*x + (-sin(y))*x^2 + 1*x^3
          sage: g.truncate()
          x^3 - x^2*sin(y) - 5*x + 3
          sage: g = f.series(x==1, 4); g

This is wrong in that:

  • the first input should not be called "symbol", since it can also be a symbolic expression of the form variable==number.
  • the description of the first argument "symbol" in the INPUT block says it has to be a variable, but the examples, etc., clearly shows it doesn't have to be.

Attachments (1)

trac_11209.patch (1.0 KB) - added by was 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by was

  • Status changed from new to needs_review

I couldn't think of a better name than "symbol". Oh well.

comment:2 Changed 10 years ago by burcin

  • Authors set to William Stein
  • Reviewers set to Burcin Erocal
  • Status changed from needs_review to positive_review

Looks good to me.

comment:3 Changed 10 years ago by jdemeyer

  • Status changed from positive_review to needs_work

According to http://sagemath.org/doc/developer/conventions.html#docstring-markup-with-rest-and-sphinx, the INPUT and OUTPUT blocks should not be indented.

Changed 10 years ago by was

comment:4 Changed 10 years ago by was

  • Status changed from needs_work to needs_review

Thanks; fixed.

comment:5 Changed 10 years ago by jdemeyer

  • Reviewers changed from Burcin Erocal to Burcin Erocal, Jeroen Demeyer
  • Status changed from needs_review to positive_review

comment:6 Changed 10 years ago by jdemeyer

  • Merged in set to sage-4.7.rc1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.