@property
    def _ndim(self):
        try:
            # From array protocol
            array = self.context[0][0].__array_interface__
            n = array['shape'][1]
            assert n == 2 or n == 3
            return n
        except __HOLE__:
            # Fall back on list
            return len(self.context[0][0][0])
dataset/ETHPy150Open Toblerity/Shapely/shapely/geometry/multipolygon.py/MultiPolygonAdapter._ndim