From 350f359d54cda7e95a4703f225dcfb80fdbe0ce7 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Thu, 9 Mar 2023 02:31:02 -0500 Subject: [PATCH] temporary workaround for image and heatmap data buffers --- fastplotlib/graphics/features/_data.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fastplotlib/graphics/features/_data.py b/fastplotlib/graphics/features/_data.py index 8e9599fa6..3d877bace 100644 --- a/fastplotlib/graphics/features/_data.py +++ b/fastplotlib/graphics/features/_data.py @@ -108,6 +108,9 @@ def update_gpu(self): """Update the GPU with the buffer""" self._update_range(None) + def __call__(self, *args, **kwargs): + return self.buffer.data + def __getitem__(self, item): return self.buffer.data[item] @@ -159,6 +162,9 @@ def update_gpu(self): def __getitem__(self, item): return self._data[item] + def __call__(self, *args, **kwargs): + return self.buffer.data + def __setitem__(self, key, value): # make sure supported type, not float64 etc. value = to_gpu_supported_dtype(value)