class_docstr: GPU data buffer that is aware of data type and elements size
  
  Parameters
  ----------
  data : ndarray | None
      Buffer data.
class_docstr_tok: ["GPU","data","buffer","that","is","aware","of","data","type","and","elements","size","Parameters","--","--","--","--","--","data",":","ndarray","|","None","Buffer","data","."]
docstr: Set a sub-region of the buffer (deferred operation).
  
  Parameters
  ----------
  data : ndarray
      Data to be uploaded
  offset: int
      Offset in buffer where to start copying data (i.e. index of
      starting element).
  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.
  **kwargs : dict
      Additional keyword arguments.
code: def set_subdata(self, data, offset=0, copy=False, **kwargs):
      """Set a sub-region of the buffer (deferred operation).
  
      Parameters
      ----------
      data : ndarray
          Data to be uploaded
      offset: int
          Offset in buffer where to start copying data (i.e. index of
          starting element).
      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.
      **kwargs : dict
          Additional keyword arguments.
  
      """
      data = self._prepare_data(data, **kwargs)
      offset = offset * self.itemsize
      Buffer.set_subdata(self, data=data, offset=offset, copy=copy)
  
imports: import numpy
  from os import path
  from traceback import extract_stack, format_list
  import weakref
  from .globject import GLObject
  from ..util import logger
label_desc: Use image node_id 3 for calling the DataBuffer obj's underlying member method code with example usage: obj.set_subdata(data, offset, copy) without return types