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)