parameter.as_signal() now correctly sets values as np.nan where the component is not active
added test
Automatic style corrections courtesy of autopep8
got rid of a few unnecessary lines