Trigger length of 1 sample (on==off) resulted in empty array.
Replaced if else with try Except to avoid unnecessary if checks.
std of single value is always 0
Merge pull request #893 from syngron/pr_trigger_empty_array

Trigger length of 1 sample (on==off) resulted in empty array.