code: def resize(self, size):
      if self.use_sip_array:
          # For reference, SIP_VERSION 6.7.8 first arrived
          # in PyQt5_sip 12.11.2 and PyQt6_sip 13.4.2
          if sip.SIP_VERSION >= 0x60708:
              if size <= self._capa:
                  self._size = size
                  return
          else:
              # sip.array prior to SIP_VERSION 6.7.8 had a
              # buggy slicing implementation.
              # so trigger a reallocate for any different size
              if size == self._capa:
                  return
  
          self._siparray = sip.array(self._Klass, size)
  
      else:
          if size <= self._capa:
              self._size = size
              return
          self._ndarray = np.empty(
              (size, self._nfields), dtype=np.float64
          )
  
          if self.use_ptr_to_array:
              # defer creation
              self._objs = None
          else:
              self._objs = self._wrap_instances(self._ndarray)
  
      self._capa = size
      self._size = size
  
imports: import ctypes
  import itertools
  import numpy
  from .None import QT_LIB, QtCore, QtGui, compat
label_desc: Use image node_id 2 for calling the PrimitiveArray obj's underlying member method code with example usage: obj.resize(size) without return types