Coverage for D:\Ralf Gerlich\git\modypy\modypy\blocks\sources.py: 75%

# Coverage for D:\Ralf Gerlich\git\modypy\modypy\blocks\sources.py : 75%

## 4 statements

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"""

2 import numpy as np

3 from modypy.model import Signal

4

5

6 def 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)