Load data using loadfunc.

        args, kwargs:
            forward to the loadfunc. args[0] must be the filename, so it
            means that loadfunc must take the filename as it's first
            argument.

        Set the filename attribute.

        .. note::
           Updates the mask if not no_auto.

        ChannelPack is assuming a need for loading data from disc. If
        there is a desire to load some made-up data, a filename pointing
        to some actual file is nevertheless required. Here is a
        suggestion::

            >>> import channelpack as cp
            >>> import tempfile

            >>> tf = tempfile.NamedTemporaryFile()

            >>> d = {2: np.arange(5), 5: np.arange(10, 15)}
            >>> def lf(fn):
            ...     return d
            ...

            >>> pack = cp.ChannelPack(lf)
            >>> pack.load(tf.name)
            >>> pack.filename is not None
            True
            >>> pack.chnames_0
            {2: 'ch2', 5: 'ch5'}

def load(self, *args, **kwargs):
        """Load data using loadfunc.

        args, kwargs:
            forward to the loadfunc. args[0] must be the filename, so it
            means that loadfunc must take the filename as it's first
            argument.

        Set the filename attribute.

        .. note::
           Updates the mask if not no_auto.

        ChannelPack is assuming a need for loading data from disc. If
        there is a desire to load some made-up data, a filename pointing
        to some actual file is nevertheless required. Here is a
        suggestion::

            >>> import channelpack as cp
            >>> import tempfile

            >>> tf = tempfile.NamedTemporaryFile()

            >>> d = {2: np.arange(5), 5: np.arange(10, 15)}
            >>> def lf(fn):
            ...     return d
            ...

            >>> pack = cp.ChannelPack(lf)
            >>> pack.load(tf.name)
            >>> pack.filename is not None
            True
            >>> pack.chnames_0
            {2: 'ch2', 5: 'ch5'}

        """
        D = self.loadfunc(*args, **kwargs)

        if self.chnames is not None:
            if set(D) - set(self.chnames):
                raise ValueError('New data set have different keys')

        self.D = D
        self.keys = sorted(self.D.keys())
        # If not all the same, there should have been an error already
        self.rec_cnt = len(self.D[self.keys[0]])

        fallnames = _fallback_names(self.keys)
        self.chnames_0 = dict(zip(self.keys, fallnames))
        self._set_filename(args[0])
        self.set_basefilemtime()

        self.args = args
        self.kwargs = kwargs

        if not self.no_auto:
            # Called here if a reload is done on the current instance I guess.
            self.make_mask()