build_hyper_edge_set_shape¶
- build_hyper_edge_set_shape(*, port_dict, feature_dict)[source]¶
Builds a numpy array representing the number of hyper-edges.
Validate that port_dict and feature_dict have consistent sizes on their last dimensions and return a scalar numpy array containing that count.
- Parameters:
port_dict (dict[str, ndarray] | None) – Mapping from port names to numpy arrays, or None.
feature_dict (dict[str, ndarray] | None) – Mapping of feature names to numpy arrays, or None.
- Returns:
A scalar numpy array of dtype float32 with the number of objects.
- Raises:
ValueError – If both inputs are None, or if their shapes conflict.
- Return type:
ndarray