[SciPy-user] I can't find unit step function.

Anne Archibald peridot.faceted at gmail.com
Tue Mar 20 16:54:20 EDT 2007


On 20/03/07, Ryan Krauss <ryanlists at gmail.com> wrote:
> Sorry to contribute to this discussion out of boredom and curiosity,
> but what about:
>
> y=where(t>0,1.0,0)

Or
y=(1+sign(t))/2.
for conciseness and the 0.5 both...

Anne



More information about the SciPy-User mailing list