Skip to content

Commit

Permalink
Try to avoid casting all ids to '|S'
Browse files Browse the repository at this point in the history
  • Loading branch information
ptormene committed Aug 1, 2023
1 parent c904cbc commit adebc59
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions openquake/calculators/event_based_damage.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,23 +341,20 @@ def _store_connectivity_analysis_results(self, conn_results):
logging.info(
'Stored complete connectivity loss by event (infra-event_ccl)')
if 'taz_cl' in conn_results:
conn_results['taz_cl'].id = conn_results['taz_cl'].id.astype('|S')
self.datastore.create_df(
'infra-taz_cl',
conn_results['taz_cl'],
display_name=DISPLAY_NAME['infra-taz_cl'])
logging.info(
'Stored connectivity loss of TAZ nodes (taz_cl)')
if 'dem_cl' in conn_results:
conn_results['dem_cl'].id = conn_results['dem_cl'].id.astype('|S')
self.datastore.create_df(
'infra-dem_cl',
conn_results['dem_cl'],
display_name=DISPLAY_NAME['infra-dem_cl'])
logging.info(
'Stored connectivity loss of demand nodes (dem_cl)')
if 'node_el' in conn_results:
conn_results['node_el'].id = conn_results['node_el'].id.astype('|S')
self.datastore.create_df(
'infra-node_el',
conn_results['node_el'],
Expand Down

0 comments on commit adebc59

Please sign in to comment.