5.13. pypfilt.check

pypfilt.check.is_entire_matrix(params, hist, raise_exc=True)

Check whether the history matrix includes all columns (including, e.g., the particle weights and parent indices).

Parameters:
  • params – The simulation parameters.
  • hist – The history matrix.
  • raise_exc – Whether to raise an exception if the check fails.
Returns:

True if the check is successful. If the check fails, either a ValueError exception is raised (if raise_exc == True) or False is returned (if raise_exc == False).

pypfilt.check.is_only_statevec(params, hist, raise_exc=True)

Check whether the history matrix contains only the particle state vector columns.

Parameters:
  • params – The simulation parameters.
  • hist – The history matrix.
  • raise_exc – Whether to raise an exception if the check fails.
Returns:

True if the check is successful. If the check fails, either a ValueError exception is raised (if raise_exc == True) or False is returned (if raise_exc == False).