def load_data(
        self,
        examples: Collection[np.ndarray],
        targets: Optional[Sequence[Any]] = None,
        target_formatter: Optional[TargetFormatter] = None,
    ) -> Sequence[Dict[str, Any]]:
        """Sets the ``num_features`` attribute and calls ``super().load_data``.

        Args:
            examples: The ``np.ndarray`` (num_examples x num_features).
            targets: Associated targets.
            target_formatter: Optionally provide a ``TargetFormatter`` to control how targets are formatted.

        Returns:
            A sequence of samples / sample metadata.

        """
        if not self.predicting and isinstance(examples, np.ndarray):
            self.num_features = examples.shape[1]
        if targets is not None:
            self.load_target_metadata(targets, target_formatter=target_formatter)
        return to_samples(examples, targets)
Sets the ``num_features`` attribute and calls ``super().load_data``.

        Args:
            examples: The ``np.ndarray`` (num_examples x num_features).
            targets: Associated targets.
            target_formatter: Optionally provide a ``TargetFormatter`` to control how targets are formatted.

        Returns:
            A sequence of samples / sample metadata.

        
src/flash/template/classification/data.py