#NEWLINE# def draw_from_prior( self ) : #NEWLINE# #INDENT# '\n        Draw a random point from the prior range considering the prior type\n\n        Returns\n        -------\n        value : float\n            A random sample inside the prior region\n\n        ' #NEWLINE# if ( self . prior_type == 'flat' ) : #NEWLINE# #INDENT# return rd . uniform ( self . prior_range [ 0 ] , self . prior_range [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . prior_type == 'gaussian' ) : #NEWLINE# #INDENT# within_bounds = False #NEWLINE# while ( not within_bounds ) : #NEWLINE# #INDENT# value = rd . gauss ( self . mu , self . sigma ) #NEWLINE# within_bounds = calue_within_prior_range ( value ) #NEWLINE# #UNINDENT# return value