MCPcopy
hub / github.com/hyperopt/hyperopt / in_domain

Method in_domain

hyperopt/rdists.py:189–190  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

187 self._norm_logcdf = scipy.stats.norm(loc=mu, scale=sigma).logcdf
188
189 def in_domain(self, x):
190 return np.isclose(x, safe_int_cast(np.round(old_div(x, self.q))) * self.q)
191
192 def pmf(self, x):
193 return np.exp(self.logpmf(x))

Callers 1

logpmfMethod · 0.95

Calls 1

safe_int_castFunction · 0.85

Tested by

no test coverage detected