Skip to content

Commit

Permalink
Fix numpy strict conversion error, (related to issue #15).
Browse files Browse the repository at this point in the history
  • Loading branch information
FA Saad committed Nov 10, 2017
1 parent 9db375f commit 8a8f853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distributions/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


def scores_to_probs(scores):
scores = numpy.array(scores)
scores = numpy.array(scores, dtype='d')
scores -= scores.max()
probs = numpy.exp(scores, out=scores)
probs /= probs.sum()
Expand Down

0 comments on commit 8a8f853

Please sign in to comment.