gem/oq-engine — pull request #879 by larsbutler (2012-09-18 14:42:48+00:00)
Title: Fix to weighted quantile curve calculation

In the case of end-branch enumeration with _more_ than 1 branch, numpy.interp (used in `quantile_curves_weighted`) cannot handle the `weights` input properly. `weights` is passed as a list of `decimal.Decimal` types.

Numpy throws back this error: TypeError: array cannot be safely cast to required typeThis doesn't appear to be a problem when there is only a single end branch in the logic tree (and so the single weight is 1.0).

This branch adds a 1 line fix to `quantile_curves_weighted`, which explicitly casts the input `weights` list to a numpy.array of type `numpy.float64`.