Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3839 by rspan...@gmail.com: ceil/ceiling: Difference between 0.7.2 and 0.7.1
http://code.google.com/p/sympy/issues/detail?id=3839

If I run sympy.S("ceil(2.3)").evalf() with sympy 0.7.1 then I get 3. However, if I run the same using sympy 0.7.2 then I get an AttributeError (see below). I discovered that switching to use ceiling() instead of ceil() works, but I have no idea why ceil() disappeared in the first place. Someone in IRC told me that the AttributeError was not the correct behaviour for 0.7.2 either.

In [32]: S("ceil(2.3)").evalf()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-32-82d9887af7f2> in <module>()
----> 1 S("ceil(2.3)").evalf()

/home/rob/tmp/sympy-install/lib/python2.7/site-packages/sympy/core/sympify.pyc in sympify(a, locals, convert_xor, strict, rational)
    176     try:
    177         a = a.replace('\n', '')
--> 178         expr = parse_expr(a, locals or {}, rational, convert_xor)
    179     except (TokenError, SyntaxError):
    180         raise SympifyError('could not parse %r' % a)

/home/rob/tmp/sympy-install/lib/python2.7/site-packages/sympy/parsing/sympy_parser.pyc in parse_expr(s, local_dict, rationalize, convert_xor)
    160
161 code = _transform(s.strip(), local_dict, global_dict, rationalize, convert_xor) --> 162 expr = eval(code, global_dict, local_dict) # take local objects in preference
    163
    164     if not hit:

<string> in <module>()

/home/rob/tmp/sympy-install/lib/python2.7/site-packages/sympy/core/symbol.pyc in __call__(self, *args)
    111     def __call__(self, *args):
    112         from function import Function
--> 113         return Function(self.name)(*args)
    114
    115     def as_real_imag(self, deep=True, **hints):

/home/rob/tmp/sympy-install/lib/python2.7/site-packages/sympy/core/function.pyc in __new__(cls, *args, **options)
    596         args = map(sympify, args)
597 result = super(AppliedUndef, cls).__new__(cls, *args, **options)
--> 598         result.nargs = len(args)
    599         return result
    600

AttributeError: 'Float' object has no attribute 'nargs'

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to