def add_data(self, y, data):
        """Add data to 'y' subchunk.

        y: int: the subchunk to add data to
        data: ndarray: data to be added. Must be 4096 numbers long.

        Does not raise an error if the subchunk already has data.
        The old data is overriden.
        Creates the subchunk if it does not exists.
        """
        self.binary_data[y] = data
        if len(data) != self.subdata_length:
            raise ValueError("%s: Data does not match the required %s bytes length: %s bytes"%(self.name, self.subdata_length, len(data)))
        try:
            self.binary_data[y].shape = self.shape
        except ValueError as e:
            a = list(e.args)
            a[0] += '%s %s: Required: %s, got: %s'%(a[0], self.name, self.shape, self.binary_data[y].shape)
            e.args = tuple(a)
            raise e
        self.destination[:, :, y * 16:16 + (y * 16)] = self.binary_data[y][:, :, :]
        if y not in self.subchunks:
            self.subchunks.append(y)
Add data to 'y' subchunk.

        y: int: the subchunk to add data to
        data: ndarray: data to be added. Must be 4096 numbers long.

        Does not raise an error if the subchunk already has data.
        The old data is overriden.
        Creates the subchunk if it does not exists.
        
pymclevel/leveldbpocket.py