RKuttruff commented on PR #185: URL: https://github.com/apache/incubator-sdap-nexus/pull/185#issuecomment-1211551329
``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [3], in <cell line: 22>() 20 start_time = datetime(2015, 11, 1) 21 end_time = datetime(2015, 11, 30) ---> 22 ts = nexuscli.time_series(datasets, bbox, start_time, end_time, spark=True) 24 print("Time Series took {} seconds to generate".format(time.perf_counter() - start)) 26 # Plot the resulting time series using the helper method show_plot File /opt/conda/lib/python3.10/site-packages/nexuscli-1.0-py3.10.egg/nexuscli/nexuscli.py:212, in time_series(datasets, bounding_box, start_datetime, end_datetime, spark) 206 time_series_data = np.array([tuple(each.values()) for each in [entry for entry in data if entry['ds'] == i]]) 208 if len(time_series_data) > 0: 209 time_series_result.append( 210 TimeSeries( 211 dataset=response['meta'][i]['shortName'], --> 212 time=np.array([datetime.utcfromtimestamp(t).replace(tzinfo=UTC) for t in 213 time_series_data[:, key_to_index['time']]]), 214 mean=time_series_data[:, key_to_index['mean']], 215 standard_deviation=time_series_data[:, key_to_index['std']], 216 count=time_series_data[:, key_to_index['cnt']], 217 minimum=time_series_data[:, key_to_index['min']], 218 maximum=time_series_data[:, key_to_index['max']], 219 ) 220 ) 222 return time_series_result File /opt/conda/lib/python3.10/site-packages/nexuscli-1.0-py3.10.egg/nexuscli/nexuscli.py:212, in <listcomp>(.0) 206 time_series_data = np.array([tuple(each.values()) for each in [entry for entry in data if entry['ds'] == i]]) 208 if len(time_series_data) > 0: 209 time_series_result.append( 210 TimeSeries( 211 dataset=response['meta'][i]['shortName'], --> 212 time=np.array([datetime.utcfromtimestamp(t).replace(tzinfo=UTC) for t in 213 time_series_data[:, key_to_index['time']]]), 214 mean=time_series_data[:, key_to_index['mean']], 215 standard_deviation=time_series_data[:, key_to_index['std']], 216 count=time_series_data[:, key_to_index['cnt']], 217 minimum=time_series_data[:, key_to_index['min']], 218 maximum=time_series_data[:, key_to_index['max']], 219 ) 220 ) 222 return time_series_result TypeError: 'numpy.str_' object cannot be interpreted as an integer``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sdap.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org