scatter plot is broken for recent QGIS / SciPy versions

Issue #8 resolved
Andreas Janz repo owner created an issue

Am 02.04.2020 um 03:19 schrieb John Gajardo:

Dear Andreas, thanks for your plugin Raster Data Plugin, it is a great software. I am trying to compute some scatter from Sentinel-2 and Landsat-8 images, but I could not do it. Every time I tried to select a band from the image list, it appears the error below. I tried with several dtypes (float, integer) and plugins versions (1.6, 16.1 and 1.6.2) but the error is the same. I am using Qgis 3.10 LTR in Windows 10.
Any help is appreciated.
Best Regards,
John G.

An error has occurred while executing Python code:

TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Traceback (most recent call last):
  File "C:/Users/John Gajardo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rasterdataplotting\rasterdataplotting\gui\rdpscatterplotwidget.py", line 171, in onMapCanvasRenderComplete
    self.readData()
  File "C:/Users/John Gajardo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rasterdataplotting\rasterdataplotting\gui\rdpscatterplotwidget.py", line 209, in readData
    self.processData()
  File "C:/Users/John Gajardo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rasterdataplotting\rasterdataplotting\gui\rdpscatterplotwidget.py", line 220, in processData
    self.dataBinner.bin(bins=bins, range=range)
  File "C:/Users/John Gajardo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rasterdataplotting\rasterdataplotting\gui\rdpscatterplotwidget.py", line 877, in bin
    values=None, statistic='count', expand_binnumbers=True)
  File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\stats\_binned_statistic.py", line 347, in binned_statistic_2d
    expand_binnumbers=expand_binnumbers)
  File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\stats\_binned_statistic.py", line 518, in binned_statistic_dd
    if not np.isfinite(values).all() or not np.isfinite(sample).all:
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.10.3-A Coruña A Coruña, 0e1f846438

Comments (1)

  1. Log in to comment