Skip to content

Commit

Permalink
Handle NaN coefficients
Browse files Browse the repository at this point in the history
  • Loading branch information
edeno committed Mar 19, 2018
1 parent 8dc24b7 commit b4214ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion replay_classification/sorted_spikes.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def predictors_by_trajectory_direction(trajectory_direction,
def get_conditional_intensity(fit_coefficients, predict_design_matrix):
'''The conditional intensity for each model
'''
return np.exp(np.dot(predict_design_matrix, fit_coefficients)).T
intensity = np.exp(np.dot(predict_design_matrix, fit_coefficients)).T
intensity[np.isnan(intensity)] = np.spacing(1)
return intensity


def atleast_kd(array, k):
Expand Down

0 comments on commit b4214ac

Please sign in to comment.