gtda.utils.check_diagrams(X, copy=False)[source]

Input validation for collections of persistence diagrams.

Basic type and sanity checks are run on the input collection and the array is converted to float type before returning. In particular, the input is checked to be an ndarray of shape (n_samples, n_points, 3).

  • X (object) – Input object to check/convert.

  • copy (bool, optional, default: False) – Whether a forced copy should be triggered.


X_validated – The converted and validated array of persistence diagrams.

Return type

ndarray of shape (n_samples, n_points, 3)