code: def _init_setup_console_data(self, order: str = "C") -> None:
          
          global _root_console
          self._key_color = None
          if self.console_c == ffi.NULL:
              _root_console = self
              self._console_data = lib.TCOD_ctx.root
          else:
              self._console_data = ffi.cast(
                  "struct TCOD_Console*", self.console_c
              )
  
          self._tiles = np.frombuffer(
              ffi.buffer(self._console_data.tiles[0 : self.width * self.height]),
              dtype=self.DTYPE,
          ).reshape((self.height, self.width))
  
          self._order = tcod._internal.verify_order(order)
docs: Setup numpy arrays over libtcod data buffers.