Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
ktongue
/
grame
like
1
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
grame
/
heaviside.py
tiffank1802
Add missing simulation and utility modules
298ea8a
4 months ago
raw
Copy download link
history
blame
contribute
delete
Safe
171 Bytes
import
numpy
as
np
def
heaviside
(
t
):
"""
Vectorized Heaviside step function: 0 for t<1, 1 for t>=1
"""
h = np.zeros_like(t)
h[t >=
1
] =
1
return
h