def update_image(self):
        if self.figure is None:
            return

        wd, ht = self.get_window_size()

        # Get surface as a numpy array
        surface = self.get_surface()
        if isinstance(surface, numpy.ndarray):
            arr8 = surface
        else:
            arr8 = numpy.fromstring(surface.tostring(), dtype=numpy.uint8)
            arr8 = arr8.reshape((ht, wd, 4))

        # Bokeh expects a 32-bit uint array type
        view = arr8.view(dtype=numpy.uint32).reshape((ht, wd))

        dst_x = dst_y = 0

        # Create an Image_RGBA object in the plot
        if self.bkimage is None:
            self.bkimage = self.figure.image_rgba(image=[view],
                                                  x=[dst_x], y=[dst_y],
                                                  dw=[wd], dh=[ht])
            d_src = self.bkimage.data_source
            self._setup_handlers(d_src)

        else:
            # note: get the data source (a ColumnDataSource) and update
            # the values
            d_src = self.bkimage.data_source
            d_src.data["image"] = [view]
            d_src.data["x"] = [dst_x]
            d_src.data["y"] = [dst_y]
            d_src.data["dw"] = [wd]
            d_src.data["dh"] = [ht]

        if self._push_server:
            try:
                #self.bkimage.data_source.push_notebook()
                #push_notebook()
                cursession().store_objects(d_src)

            except Exception as e:
                self.logger.warning((str(e)) % "Can't update bokeh plot: %s")
dataset/ETHPy150Open ejeschke/ginga/ginga/web/bokehw/ImageViewBokeh.py/ImageViewBokeh2.update_image/swapped operands of `%`