Skip to content

Commit

Permalink
Merge pull request #392 from junkyul/master
Browse files Browse the repository at this point in the history
check if input numpy array is empty in hawkes_em.cpp
  • Loading branch information
PhilipDeegan authored Sep 5, 2019
2 parents 57832a3 + 9fca3b2 commit 345e967
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cpp/hawkes/inference/hawkes_em.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ void HawkesEM::compute_intensities_ur(
break;
last_indices[node_v]--;
}
if (t_i < timestamps_v[last_indices[node_v]]) continue;
// if (t_i < timestamps_v[last_indices[node_v]]) continue;
if ( (timestamps_v.size() == 0) || (t_i < timestamps_v[last_indices[node_v]]) ) continue;

// Get the corresponding kernels and their size
ArrayDouble kernel_ruv = view_row(kernel_u, node_v);
Expand Down

0 comments on commit 345e967

Please sign in to comment.