Le 04/02/2015 06:58, Jaime Fernández del Río a écrit :
>
> I have an implementation of the Heaviside function as numpy
> ufunc. Is there any interest in adding this to numpy? The
> function is simply:
>
> 0if x < 0
> heaviside(x) = 0.5 if x == 0
>
On 04.02.2015 11:45, Daπid wrote:
> There are several definitions. Abramowitz and Stegun
> (http://people.math.sfu.ca/~cbm/aands/page_1020.htm) assign the value
> 0.5 at x=0.
The NIST handbook uses the value 0 at x=0.
Perhaps a Heaviside with an optional argument that defines the value at
x=0 wo
On 4 February 2015 at 11:05, Sturla Molden wrote:
> On 04/02/15 06:18, Warren Weckesser wrote:
>
>> By "discrete form", do you mean discrete time (i.e. a function defined
>> on the integers)? Then I agree, the discrete time unit step function is
>> defined as
>
> It is the cumulative integral of
On 04/02/15 06:18, Warren Weckesser wrote:
> By "discrete form", do you mean discrete time (i.e. a function defined
> on the integers)? Then I agree, the discrete time unit step function is
> defined as
It is the cumulative integral of the delta function, and thus it can
never obtain the value
On Wed, Feb 4, 2015 at 12:18 AM, Warren Weckesser <
warren.weckes...@gmail.com> wrote:
>
>
> On Tue, Feb 3, 2015 at 11:14 PM, Sturla Molden
> wrote:
>
>> Warren Weckesser wrote:
>>
>> > 0if x < 0
>> > heaviside(x) = 0.5 if x == 0
>> > 1if x >
On Tue, Feb 3, 2015 at 12:58 PM, Warren Weckesser <
warren.weckes...@gmail.com> wrote:
> I have an implementation of the Heaviside function as numpy ufunc. Is
> there any interest in adding this to numpy? The function is simply:
>
> 0if x < 0
> heaviside(x) = 0.5 if
On Tue, Feb 3, 2015 at 11:14 PM, Sturla Molden
wrote:
> Warren Weckesser wrote:
>
> > 0if x < 0
> > heaviside(x) = 0.5 if x == 0
> > 1if x > 0
> >
>
> This is not correct. The discrete form of the Heaviside step function has
> the value 1 for
> This is not correct. The discrete form of the Heaviside step function has
> the value 1 for x == 0.
>
Yeah, I was looking at it and wondering if I'd misremembered the
definition. Assuming you're implementing the discrete Heaviside function,
H[0] = 1 as Sturla notes.
___
Warren Weckesser wrote:
> 0if x < 0
> heaviside(x) = 0.5 if x == 0
> 1if x > 0
>
This is not correct. The discrete form of the Heaviside step function has
the value 1 for x == 0.
heaviside = lambda x : 1 - (x < 0).astype(int)
Sturla
___
That seems useful to me.
On Tue, Feb 3, 2015 at 3:58 PM, Warren Weckesser wrote:
> I have an implementation of the Heaviside function as numpy ufunc. Is
> there any interest in adding this to numpy? The function is simply:
>
> 0if x < 0
> heaviside(x) = 0.5 if x =
I have an implementation of the Heaviside function as numpy ufunc. Is
there any interest in adding this to numpy? The function is simply:
0if x < 0
heaviside(x) = 0.5 if x == 0
1if x > 0
Warren
__
11 matches
Mail list logo