TypeError Traceback (most recent call last) in ----> 1 detect_batch(df_daily, sensitivity=95) in detect_batch(request_data_df, endpoint, url, subscription_key, sensitivity, granularity, period) 22 23 # plot results ---> 24 plot_results(result_df, "Batch Anomaly Detection ({} Sensitivity)".format(sensitivity)) 25 26 def convert_to_json(df, sensitivity=95, granularity="daily", period=None, maxAnomalyRatio=None): in plot_results(df, title, timestamp_col_name, val_col_name) 58 plt.plot_date(time, upper_margin, fmt="g-", alpha=0.1) 59 plt.plot_date(time, lower_margin, fmt="g-", alpha=0.1) ---> 60 plt.fill_between(time, upper_margin, lower_margin, color="g", alpha=0.1, label="Boundary") 61 plt.plot_date(anomalies[timestamp_col_name], anomalies[val_col_name], fmt="ro", alpha=0.7, label="Anomalies") 62 plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py in fill_between(x, y1, y2, where, interpolate, step, data, **kwargs) 2608 return gca().fill_between( 2609 x, y1, y2=y2, where=where, interpolate=interpolate, step=step, -> 2610 **({"data": data} if data is not None else {}), **kwargs) 2611 2612 C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\__init__.py in inner(ax, data, *args, **kwargs) 1808 "the Matplotlib list!)" % (label_namer, func.__name__), 1809 RuntimeWarning, stacklevel=2) -> 1810 return func(ax, *args, **kwargs) 1811 1812 inner.__doc__ = _add_data_doc(inner.__doc__, C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_axes.py in fill_between(self, x, y1, y2, where, interpolate, step, **kwargs) 5045 5046 # Convert the arrays so we can work with them -> 5047 x = ma.masked_invalid(self.convert_xunits(x)) 5048 y1 = ma.masked_invalid(self.convert_yunits(y1)) 5049 y2 = ma.masked_invalid(self.convert_yunits(y2)) C:\ProgramData\Anaconda3\lib\site-packages\numpy\ma\core.py in masked_invalid(a, copy) 2364 cls = type(a) 2365 else: -> 2366 condition = ~(np.isfinite(a)) 2367 cls = MaskedArray 2368 result = a.view(cls) 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''