labscript.labscript.max_or_zero

max_or_zero(*args, **kwargs)[source]

Returns max of the arguments or zero if sequence is empty.

The protects the call to max() which would normally throw an error on an empty sequence.

Parameters
  • *args – Items to compare.

  • **kwargs – Passed to max().

Returns

Max of *args.