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

Anne Archibald peridot.faceted@gmail....
Tue Mar 20 15:54:20 CDT 2007


On 20/03/07, Ryan Krauss <ryanlists@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