sporkus / probe_accuracy_tests

GNU General Public License v3.0
139 stars 29 forks source link

TypeError: ufunc 'isfinite' not supported for the input types #14

Closed ZeSlammy closed 1 year ago

ZeSlammy commented 1 year ago

Full error is : 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''

Installed with the script, reinstalled MatPlotLib just in case. The corner script goes ok but after that fails with the mentioned error

pi@voron:~ $ python3 $HOME/probe_accuracy_tests/probe_accuracy_test_suite.py -c --export_csv
Leveling
Safe z has not been set in klicky-variables or in [safe_z_home]
Enter safe z height to avoid crash:3

Test probe around the bed to see if there are issues with individual drives
Leveling
4...3...2...1...Done
                                    min       max     first  ...  count    range    drift
test                                                         ...
1:corner 30samples (10, 290)   5.534482  5.550732  5.534482  ...     30  0.01625  0.01625
2:corner 30samples (340, 290)  5.535732  5.548232  5.535732  ...     30  0.01250  0.01250
3:corner 30samples (10, 5)     5.529482  5.555732  5.529482  ...     30  0.02625  0.02625
4:corner 30samples (340, 5)    5.504482  5.525732  5.504482  ...     30  0.02125  0.02000

[4 rows x 9 columns]
Traceback (most recent call last):
  File "/home/pi/probe_accuracy_tests/probe_accuracy_test_suite.py", line 599, in <module>
    main(args)
  File "/home/pi/probe_accuracy_tests/probe_accuracy_test_suite.py", line 58, in main
    test_routine(**userparams)
  File "/home/pi/probe_accuracy_tests/probe_accuracy_test_suite.py", line 69, in test_routine
    dfs.append(test_corners(n=corner, force_dock=force_dock, **kwargs))
  File "/home/pi/probe_accuracy_tests/probe_accuracy_test_suite.py", line 169, in test_corners
    facet_plot(df, cols=2, plot_nm=plot_nm)
  File "/home/pi/probe_accuracy_tests/probe_accuracy_test_suite.py", line 252, in facet_plot
    plot_probes(x, y, measurement, ax)
  File "/home/pi/probe_accuracy_tests/probe_accuracy_test_suite.py", line 273, in plot_probes
    ax.fill_between(x, y.quantile(0.75), y.quantile(0.25), color=(0, 1, 0, 0.3))
  File "/usr/lib/python3/dist-packages/matplotlib/__init__.py", line 1449, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_axes.py", line 5301, in fill_between
    return self._fill_between_x_or_y(
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_axes.py", line 5203, in _fill_between_x_or_y
    ind = ma.masked_invalid(getattr(self, f"convert_{ind_dir}units")(ind))
  File "/home/pi/.local/lib/python3.9/site-packages/numpy/ma/core.py", line 2360, in masked_invalid
    return masked_where(~(np.isfinite(getdata(a))), a, copy=copy)
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''
ZeSlammy commented 1 year ago

Updated to latest version, works like a charm.