def get_distribution_names(namespace_pairs, rv_base_class):
 distn_names = []
 distn_gen_names = []
 for (name, value) in namespace_pairs:
  if name.startswith('_'):
   continue
  if (name.endswith('_gen') and issubclass(value, rv_base_class)):
   distn_gen_names.append(name)
  if isinstance(value, rv_base_class):
   distn_names.append(name)
 return (distn_names, distn_gen_names)

def get_distribution_names ( namespace_pairs , rv_base_class ) : distn_names = [ ] distn_gen_names = [ ] for ( name , value ) in namespace_pairs : if name . startswith ( '_' ) : continue if ( name . endswith ( '_gen' ) and issubclass ( value , rv_base_class ) ) : distn_gen_names . append ( name ) if isinstance ( value , rv_base_class ) : distn_names . append ( name ) return ( distn_names , distn_gen_names )
collect names of statistical distributions and their generators .