def summarize(self, geom, stat=None):
        """Returns a new RasterQuerySet with subsetted/summarized ndarrays.

        Arguments:
        geom -- geometry for masking or spatial subsetting
        Keyword args:
        stat -- any numpy summary stat method as str (min/max/mean/etc)
        """
        if not hasattr(geom, 'num_coords'):
            raise TypeError('Need OGR or GEOS geometry, %s found' % type(geom))
        clone = self._clone()
        for obj in clone:
            arr = obj.array(geom)
            if arr is not None:
                if stat:
                    arr = agg_dims(arr, stat)
                try:
                    arr = arr.squeeze()
                except ValueError:
                    pass
            obj.image = arr
        return clone