docs: def _initialise_data(self, memmap_dir=None):
          """Initialise data array to zeros"""
  
          if self.number_values == 0:
              pass
          elif self.data_type.nptype is None:
              self._data = []
          else:
              if memmap_dir:
                  memmap_file = tempfile.NamedTemporaryFile(
                      mode='w+b', prefix="nptdms_", dir=memmap_dir)
                  self._data = np.memmap(
                      memmap_file.file,
                      mode='w+',
                      shape=(self.number_values,),
                      dtype=self.data_type.nptype)
              else:
                  self._data = np.zeros(
                      self.number_values, dtype=self.data_type.nptype)
              self._data_insert_position = 0
          if self._data is not None:
              log.debug("Allocated %d sample slots for %s", len(self._data),
                        self.path)
          else:
              log.debug("Allocated no space for %s", self.path)