[Numpy-discussion] Any interest in a 'heaviside' ufunc?

Alexander Eberspächer alex.eberspaecher at gmail.com
Thu Feb 5 16:35:51 EST 2015


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 would be good. I'd love to see that in NumPy.

> Actually, Heaviside function is better seen as a distribution instead
> of a function, and then there is no problem with the value at 0, as
> long as it is finite.

Understanding a distribution as the limit of a sequence of functions,
the value at x=0 then depended on the choice of function in the
sequence, I guess. Using something symmetrical such a Gaussian or a
centred box then makes the value of 0.5 plausible.

Alex



More information about the NumPy-Discussion mailing list