def scipy_exponweib_sucks(value, alpha, beta):
 pdf = np.log(sp.exponweib.pdf(value, 1, alpha, scale=beta))
 if np.isinf(pdf):
  return sp.exponweib.logpdf(value, 1, alpha, scale=beta)
 return pdf

def scipy_exponweib_sucks ( value , alpha , beta ) : pdf = np . log ( sp . exponweib . pdf ( value , 1 , alpha , scale = beta ) ) if np . isinf ( pdf ) : return sp . exponweib . logpdf ( value , 1 , alpha , scale = beta ) return pdf
this function is required because scipys implementation of the weibull pdf fails for some valid combinations of parameters .