Opened 3 years ago

Closed 3 years ago

#28891 closed defect (fixed)

character art and sympy-conversion of symbolic series

Reported by: Markus Wageringel Owned by:
Priority: minor Milestone: sage-9.0
Component: symbolics Keywords: sympy
Cc: Merged in:
Authors: Markus Wageringel Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 8bdd72d (Commits, GitHub, GitLab) Commit: 8bdd72df1d6e8e0ce807da2deca8239e657bc559
Dependencies: Stopgaps:

Status badges

Description

This ticket fixes the broken ascii and unicode art of symbolic series by implementing the appropriate conversions to Sympy (which are called by the generic character art methods of symbolic expressions).

Before:

sage: unicode_art(exp(x).series(x, 4))
(1, +, 1*x, +, 1/2*x², +, 1/6*x³, +, Order(x⁴⁾)
sage: unicode_art(exp(x).series(x==1, 3))
((e), +, (e)*(x, -, 1), +, (1/2*e)*(x, -, 1)², +, Order((x, -, 1)³⁾)

After:

sage: unicode_art(exp(x).series(x, 4))
         2    3
        x    x     ⎛ 4⎞
1 + x + ── + ── + O⎝x ⎠
        2    6
sage: unicode_art(exp(x).series(x==1, 3))
                         2
                ℯ⋅(x - 1)     ⎛       3       ⎞
ℯ + ℯ⋅(x - 1) + ────────── + O⎝(x - 1) ; x → 1⎠
                    2

Extra care is taken to allow series expansions at non-zero positions as above, as Sympy's function O takes slightly different arguments than Sage's Order.

Change History (5)

comment:1 Changed 3 years ago by Markus Wageringel

Authors: Markus Wageringel
Branch: u/gh-mwageringel/28891
Commit: 7818ba9b652570eff8b4254a6b36460f3efbc8c7
Status: newneeds_review

New commits:

7818ba928891: character art/sympy-conversion of symbolic series

comment:2 Changed 3 years ago by git

Commit: 7818ba9b652570eff8b4254a6b36460f3efbc8c790a595f8f3dc17f0e89dfd084755010112ea4043

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

90a595f28891: character art/sympy-conversion of symbolic series

comment:3 Changed 3 years ago by git

Commit: 90a595f8f3dc17f0e89dfd084755010112ea40438bdd72df1d6e8e0ce807da2deca8239e657bc559

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

8bdd72d28891: character art/sympy-conversion of symbolic series

comment:4 Changed 3 years ago by Frédéric Chapoton

Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

ok, thx

comment:5 Changed 3 years ago by Volker Braun

Branch: u/gh-mwageringel/288918bdd72df1d6e8e0ce807da2deca8239e657bc559
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.