brainpy.inputs.constant_input#
- brainpy.inputs.constant_input(I_and_duration, dt=None)[source]#
Format constant input in durations.
For example:
If you want to get an input where the size is 0 bwteen 0-100 ms, and the size is 1. between 100-200 ms.
>>> import brainpy.math as bm >>> constant_input([(0, 100), (1, 100)]) >>> constant_input([(bm.zeros(100), 100), (bm.random.rand(100), 100)])