Skip to content

Commit

Permalink
Converting indexes of triggers into np.int32 because of numpy 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquot committed Nov 27, 2024
1 parent 3327696 commit 256061c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/pycbc_multi_inspiral
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,10 @@ with ctx:
), f'SNR time series for {ifo} is empty'
norm_dict[ifo] = norm
corr_dict[ifo] = corr.copy()
idx[ifo] = ind.copy()
idx[ifo] = ind.astype(np.int32)
# change to integer indexes because we will have to do
# arithmetic with time_delay_idx, which can be positive
#or negative
snr[ifo] = snrv * norm

# Move onto next segment if there are no triggers.
Expand Down Expand Up @@ -692,8 +695,8 @@ with ctx:
idx[ifo]
> time_delay_idx[slide][position_index][ifo],
idx[ifo]
- time_delay_idx[slide][position_index][ifo]
< len(snr_dict[ifo]),
< time_delay_idx[slide][position_index][ifo]
+ len(snr_dict[ifo]),
)
]
for ifo in args.instruments
Expand Down

0 comments on commit 256061c

Please sign in to comment.