Add a data attribute.
        Note that the field type will be modified !
        
        :param name: name of the new attribute
        :type name: str
        :param ftype: type of the new attribute
        :type ftype: subclass of :class:`.GenericType`

def add_attribute(self, name, ftype):
        """ Add a data attribute.
        Note that the field type will be modified !
        
        :param name: name of the new attribute
        :type name: str
        :param ftype: type of the new attribute
        :type ftype: subclass of :class:`.GenericType`
        """
        if name in self._ftype.attrs:
            raise SchemaError("VectorField has already attribute named '%s' (attrs: %s)" % (name, list(self._ftype.attrs)))
        # add the attr to the underlying GenericType
        self._ftype.attrs[name] = ftype
        # add the attr it self
        self._attrs[name] = [DocField.FromType(ftype) for _ in range(len(self))]