def set_data(self, data, copy=False):
    ' Set data in the buffer (deferred operation).\n\n        This completely resets the size and contents of the buffer.\n\n        Parameters\n        ----------\n        data : ndarray\n            Data to be uploaded\n        copy: bool\n            Since the operation is deferred, data may change before\n            data is actually uploaded to GPU memory.\n            Asking explicitly for a copy will prevent this behavior.\n        '
    data = np.array(data, copy=copy)
    nbytes = data.nbytes
    if (nbytes != self._nbytes):
        self.resize_bytes(nbytes)
    else:
        self._glir.command('SIZE', self._id, nbytes)
    if nbytes:
        self._glir.command('DATA', self._id, 0, data)
Set data in the buffer (deferred operation).

This completely resets the size and contents of the buffer.

Parameters
----------
data : ndarray
    Data to be uploaded
copy: bool
    Since the operation is deferred, data may change before
    data is actually uploaded to GPU memory.
    Asking explicitly for a copy will prevent this behavior.
def set_data(self, data, copy=False):
    ' Set data in the buffer (deferred operation).\n\n        This completely resets the size and contents of the buffer.\n\n        Parameters\n        ----------\n        data : ndarray\n            Data to be uploaded\n        copy: bool\n            Since the operation is deferred, data may change before\n            data is actually uploaded to GPU memory.\n            Asking explicitly for a copy will prevent this behavior.\n        '
    data = np.array(data, copy=copy)
    nbytes = data.nbytes
    if (nbytes != self._nbytes):
        self.resize_bytes(nbytes)
    else:
        self._glir.command('SIZE', self._id, nbytes)
    if nbytes:
        self._glir.command('DATA', self._id, 0, data)