def resize(self, shape=None, value=None):
        cls = self.__class__
        try :
            newshape, newndim, nsize = cls._expandshape(shape, None, None)
            new = cls(shape=newshape).filled(value)
        except :
            raise TypeError, "new shape %s is not compatible with class %s" % (shape, clsname(self))

        flatIter = self.flat
        newIter = new.flat
        ln = min(len(flatIter), len(newIter))
        for i in xrange(ln) :
            newIter[i] = flatIter[i]
        self.assign(new)
a.resize([shape[, value]])
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/util/arrays.py/Array.resize