Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1"""Provides some simple source blocks""" 

2import numpy as np 

3from modypy.model import Signal 

4 

5 

6def constant(value): 

7 """ 

8 Create a constant signal 

9 

10 Args: 

11 value: The value of the signal 

12 

13 Returns: 

14 A signal with the required constant value 

15 """ 

16 

17 return Signal(shape=np.shape(value), 

18 value=value)