HyperEdgeSet.unpad

HyperEdgeSet.unpad(target_shape)[source]

Remove all objects beyond the index target in a single HyperEdgeSet.

Parameters:

target_shape (ndarray | int) – New n_obj; must be ≤ current n_obj.

Raises:

ValueError – If called on a batch or if target_shape > current n_obj.