|
|
|
@ -78,16 +78,17 @@ class NormalPosterior(Cell):
|
|
|
|
|
if not isinstance(shape, (tuple, list)):
|
|
|
|
|
raise TypeError('The type of `shape` should be `tuple` or `list`')
|
|
|
|
|
|
|
|
|
|
if not isinstance(loc_mean, (int, float)):
|
|
|
|
|
if isinstance(loc_mean, bool) or not isinstance(loc_mean, (int, float)):
|
|
|
|
|
raise TypeError('The type of `loc_mean` should be `int` or `float`')
|
|
|
|
|
|
|
|
|
|
if not isinstance(untransformed_scale_mean, (int, float)):
|
|
|
|
|
if isinstance(untransformed_scale_mean, bool) or not isinstance(untransformed_scale_mean, (int, float)):
|
|
|
|
|
raise TypeError('The type of `untransformed_scale_mean` should be `int` or `float`')
|
|
|
|
|
|
|
|
|
|
if not (isinstance(loc_std, (int, float)) and loc_std >= 0):
|
|
|
|
|
if isinstance(loc_std, bool) or not (isinstance(loc_std, (int, float)) and loc_std >= 0):
|
|
|
|
|
raise TypeError('The type of `loc_std` should be `int` or `float` and its value should > 0')
|
|
|
|
|
|
|
|
|
|
if not (isinstance(untransformed_scale_std, (int, float)) and untransformed_scale_std >= 0):
|
|
|
|
|
if isinstance(loc_std, bool) or not (isinstance(untransformed_scale_std, (int, float)) and
|
|
|
|
|
untransformed_scale_std >= 0):
|
|
|
|
|
raise TypeError('The type of `untransformed_scale_std` should be `int` or `float` and '
|
|
|
|
|
'its value should > 0')
|
|
|
|
|
|
|
|
|
|