如何修复ufunc'isfinite'的TypeError?

时间:2019-11-03 22:12:38

标签: python matplotlib

下面是跟踪。我不完全确定这对错误意味着什么以及必须在哪里修复。

x[i+j]

最后一次调用中第348行的代码来自matplotlib,如下所示。

Traceback (most recent call last):
  File "/home/william/SOFTX-D-16-00075-master/runGsolve.py", line 1775, in <module>
    dmw = DesignerMainWindow()
  File "/home/william/SOFTX-D-16-00075-master/runGsolve.py", line 45, in __init__
    self.setupUi(self)
  File "/home/william/SOFTX-D-16-00075-master/GsolveGUIv3.py", line 410, in setupUi
    self.mplwidget = MatplotlibWidget(self.frame_14)
  File "/usr/local/lib/python3.6/dist-packages/pyqtgraph/widgets/MatplotlibWidget.py", line 34, in __init__
    self.fig = Figure(size, dpi=dpi)
  File "/home/william/.local/lib/python3.6/site-packages/matplotlib/figure.py", line 348, in __init__
    if not np.isfinite(figsize).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''

0 个答案:

没有答案