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

bug somewhere in the symbolics #1772

Closed
williamstein opened this issue Jan 14, 2008 · 4 comments
Closed

bug somewhere in the symbolics #1772

williamstein opened this issue Jan 14, 2008 · 4 comments

Comments

@williamstein
Copy link
Contributor

This is from Hector:

I also hit this bug while doing this (taken from the "piecewise"
documentation):

sage: f1 = lambda x:-1
sage: f2 = lambda x:2
sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]])
sage: P = f.plot_fourier_series_partial_sum(15,pi,-5,5)   # long time
boom
...

/Users/was/s/local/lib/python2.5/site-packages/sage/calculus/calculus.py in <lambda>(i)
   3607             # We need to do this maximum to correctly handle the case where
   3608             # self is something like (sin+1)
-> 3609             n = max( max(map(lambda i: i.number_of_arguments(), self._operands)+[0]), len(variables) )
   3610         self.__number_of_args = n
   3611         return n

<type 'exceptions.AttributeError'>: 'Pi' object has no attribute 'number_of_arguments'

Component: calculus

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

@williamstein williamstein added this to the sage-2.10.1 milestone Jan 14, 2008
@williamstein williamstein self-assigned this Jan 14, 2008
@mwhansen mwhansen assigned mwhansen and unassigned williamstein Jan 15, 2008
@mwhansen
Copy link
Contributor

comment:2

Attachment: 1772.patch.gz

@williamstein
Copy link
Contributor Author

comment:3

I also fixed this in the same way earlier today (as part of one my other patches), but my patch was just a few lines to actually fix the listed problem. The patch attached to this ticket, fixes the problem and does a HUGE amount more to vastly improve doctesting in some files, etc. I.e., this is great.

I have not fully reviewed the patch yet, though I've looked it over by eye and it looks very good.

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 20, 2008

Attachment: 1772-bug.patch.gz

Fixes the one doctest failure in constant.py

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jan 20, 2008

comment:5

Merged in Sage 2.10.1.alpha0

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Jan 20, 2008
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

2 participants