Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SymPy's ceiling() is not translated to Sage #22566

Closed
pelegm opened this issue Mar 10, 2017 · 16 comments
Closed

SymPy's ceiling() is not translated to Sage #22566

pelegm opened this issue Mar 10, 2017 · 16 comments

Comments

@pelegm
Copy link
Contributor

pelegm commented Mar 10, 2017

sage: ceil(x)
ceil(x)
sage: _._sympy_()
ceiling(x)
sage: _._sage_()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-9-7149a2430cab> in <module>()
----> 1 _._sage_()

/home/ralf/sage/local/lib/python2.7/site-packages/sympy/core/function.py in _sage_(self)
    705         import sage.all as sage
    706         fname = self.func.__name__
--> 707         func = getattr(sage, fname)
    708         args = [arg._sage_() for arg in self.args]
    709         return func(*args)

AttributeError: 'module' object has no attribute 'ceiling'
sage: 

Previous description was:

sage: integrate(ceil(x), x, 0, infinity, algorithm='sympy')

leads to

Traceback (most recent call last):
  File "<ipython-input-3-257ec54e6dd3>", line 1, in <module>
    integrate(ceil(x), x, Integer(0), infinity, algorithm='sympy')
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sage/misc/functional.py", line 664, in integral
    return x.integral(*args, **kwds)
  File "sage/symbolic/expression.pyx", line 11766, in sage.symbolic.expression.Expression.integral (build/cythonized/sage/symbolic/expression.cpp:65026)
    return integral(self, *args, **kwds)
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py", line 773, in integrate
    return integrator(expression, v, a, b)
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py", line 42, in sympy_integrator
    return result._sage_()
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sympy/integrals/integrals.py", line 1100, in _sage_
    f, limits = self.function._sage_(), list(self.limits)
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sympy/core/function.py", line 707, in _sage_
    func = getattr(sage, fname)
AttributeError: 'module' object has no attribute 'ceiling'

Depends on #23923

Component: calculus

Keywords: ceil, integrate, sympy

Author: Ralf Stephan

Branch/Commit: 319c8b9

Reviewer: Marcelo Forets

Issue created by migration from https://trac.sagemath.org/ticket/22566

@pelegm pelegm added this to the sage-7.6 milestone Mar 10, 2017
@rwst
Copy link
Contributor

rwst commented Mar 11, 2017

Upstream: Not yet reported upstream; Will do shortly.

@rwst
Copy link
Contributor

rwst commented Mar 11, 2017

comment:1

This has to be fixed in SymPy. This ticket should monitor progress and commit a doctest.

@rwst

This comment has been minimized.

@rwst rwst changed the title Integrate ceil(x) via sympy raises an AttributeError SymPy's ceiling() is not translated to Sage Mar 11, 2017
@rwst
Copy link
Contributor

rwst commented Oct 17, 2017

Branch: u/rws/22566

@rwst
Copy link
Contributor

rwst commented Oct 17, 2017

Author: Ralf Stephan

@rwst
Copy link
Contributor

rwst commented Oct 17, 2017

Last 10 new commits:

07f474423990: handle unequality
0ed659f23990: do not evaluate
5f023ea23990: convert relations from SymPy to Sage, with test
0f596bb23990: fix patch
479e20623990: sympy patchlevel bump
3e362ee24006: SymPy --> Sage conversion completely inside Sage
8dd5f8824006: add missing file, fixes
a68d57f23923: Interface cases function with SymPy's piecewise
b80d98c23923: fix typo
2afa0ee22566: interface SymPy's ceiling()

@rwst
Copy link
Contributor

rwst commented Oct 17, 2017

Changed upstream from Not yet reported upstream; Will do shortly. to none

@rwst
Copy link
Contributor

rwst commented Oct 17, 2017

Dependencies: #23923

@rwst
Copy link
Contributor

rwst commented Oct 17, 2017

Commit: 2afa0ee

@rwst rwst modified the milestones: sage-7.6, sage-8.1 Oct 17, 2017
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 17, 2017

Changed commit from 2afa0ee to 9494f6c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 17, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

9494f6c22566: add test

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 17, 2017

Changed commit from 9494f6c to 319c8b9

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 17, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

b261ec323923: fix doctest
319c8b9Merge branch 'u/rws/23923' of git://trac.sagemath.org/sage into t/22566/22566

@mforets
Copy link
Mannequin

mforets mannequin commented Oct 18, 2017

Reviewer: Marcelo Forets

@mforets
Copy link
Mannequin

mforets mannequin commented Oct 18, 2017

comment:6

LGTM.

@vbraun
Copy link
Member

vbraun commented Nov 1, 2017

Changed branch from u/rws/22566 to 319c8b9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants