Recent versions of Numpy have broken a number of features in several
packages by requiring integer indices for indexing or slicing arrays
(non-float types!). Unfortunately there is plenty of software that used
this now-deprecated feature, including pyqtgraph.
Is there any plan to update this so that some of these features will work
again in Python 2.7?
For example, when you right click on an image and try to export it, it
results in the following error:
Traceback (most recent call last):
File
"/usr/local/lib/python2.7/dist-packages/pyqtgraph/exporters/Exporter.py",
line 77, in fileSaveFinished
self.export(fileName=fileName, **self.fileDialog.opts)
File
"/usr/local/lib/python2.7/dist-packages/pyqtgraph/exporters/ImageExporter.py",
line 70, in export
bg = np.empty((self.params['width'], self.params['height'], 4),
dtype=np.ubyte)
I think the fix is straight-forward enough, although tedious to find other
areas it applies. It is probably something like this:
bg = np.empty((self.params['width'].astype(np.int),
self.params['height'].astype(np.int), 4), dtype=np.ubyte)
or
bg = np.empty((int(self.params['width']), int(self.params['height']),
4), dtype=np.ubyte)
--
You received this message because you are subscribed to the Google Groups
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyqtgraph/1176b3cf-93ff-40dd-b65d-0fe1f5e719c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.