def _checkbase(self, base):
        """Check the `base` storage atom."""

        if base.kind == 'enum':
            raise TypeError("can not use an enumerated atom "
                            "as a storage atom: %r" % base)

        # Check whether the storage atom can represent concrete values
        # in the enumeration...
        basedtype = base.dtype
        pyvalues = [value for (name, value) in self.enum]
        try:
            npgenvalues = numpy.array(pyvalues)
        except __HOLE__:
            raise TypeError("concrete values are not uniformly-shaped")
        try:
            npvalues = numpy.array(npgenvalues, dtype=basedtype.base)
        except ValueError:
            raise TypeError("storage atom type is incompatible with "
                            "concrete values in the enumeration")
        if npvalues.shape[1:] != basedtype.shape:
            raise TypeError("storage atom shape does not match that of "
                            "concrete values in the enumeration")
        if npvalues.tolist() != npgenvalues.tolist():
            raise TypeError("storage atom type lacks precision for "
                            "concrete values in the enumeration")

        # ...with some implementation limitations.
        if not npvalues.dtype.kind in ['i', 'u']:
            raise NotImplementedError("only integer concrete values "
                                      "are supported for the moment, sorry")
        if len(npvalues.shape) > 1:
            raise NotImplementedError("only scalar concrete values "
                                      "are supported for the moment, sorry")
dataset/ETHPy150Open PyTables/PyTables/tables/atom.py/EnumAtom._checkbase