def __init__(self, frames=None, items=None, major_axis=None,
                 minor_axis=None, default_fill_value=np.nan,
                 default_kind='block', copy=False):

        # deprecation #11157
        warnings.warn("SparsePanel is deprecated and will be removed in a "
                      "future version", FutureWarning, stacklevel=2)

        if frames is None:
            frames = {}

        if isinstance(frames, np.ndarray):
            new_frames = {}
            for item, vals in zip(items, frames):
                new_frames[item] = SparseDataFrame(
                    vals, index=major_axis, columns=minor_axis,
                    default_fill_value=default_fill_value,
                    default_kind=default_kind)
            frames = new_frames

        if not isinstance(frames, dict):
            raise TypeError('input must be a dict, a %r was passed' %
                            type(frames).__name__)

        self.default_fill_value = fill_value = default_fill_value
        self.default_kind = kind = default_kind

        # pre-filter, if necessary
        if items is None:
            items = Index(sorted(frames.keys()))
        items = _ensure_index(items)

        (clean_frames, major_axis,
         minor_axis) = _convert_frames(frames, major_axis, minor_axis,
                                       kind=kind, fill_value=fill_value)

        self._frames = clean_frames

        # do we want to fill missing ones?
        for item in items:
            if item not in clean_frames:
                raise ValueError('column %r not found in data' % item)

        self._items = items
        self.major_axis = major_axis
        self.minor_axis = minor_axis
dataset/ETHPy150Open pydata/pandas/pandas/sparse/panel.py/SparsePanel.__init__/original