#2452: heaviside step function needed
-------------------------+--------------------------------------------------
Reporter: gfurnish | Owner: gfurnish
Type: enhancement | Status: assigned
Priority: critical | Milestone: sage-3.2
Component: calculus | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by wdj):
This might explain the problem:
{{{
sage: def unit_step(c):
return piecewise( [( (-Infinity,c), 0), ((c, Infinity), 1)] )
....:
sage: unit_step(1)
Piecewise defined function with 2 parts, [((-Infinity, 1), 0), ((1,
+Infinity), 1)]
sage: unit_step(1)(1/2)
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/wdj/sagefiles/sage-3.2.alpha0/<ipython console> in <module>()
/home/wdj/sagefiles/sage-3.2.alpha0/local/lib/python2.5/site-
packages/sage/functions/piecewise.pyc in __call__(self, x0)
591 for i in range(n):
592 if endpts[i] < x0 < endpts[i+1]:
--> 593 return self.functions()[i](x0)
594 raise ValueError,"Value not defined outside of domain."
595
TypeError: 'sage.rings.integer.Integer' object is not callable
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2452#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---