def norm_entropy_vec(loc, scale):
 if (isinstance(loc, float) or isinstance(loc, int)):
  return stats.norm.entropy(loc, scale)
 else:
  return np.array([stats.norm.entropy(loc_x, scale_x) for (loc_x, scale_x) in zip(loc, scale)])

def norm_entropy_vec ( loc , scale ) : if ( isinstance ( loc , float ) or isinstance ( loc , int ) ) : return stats . norm . entropy ( loc , scale ) else : return np . array ( [ stats . norm . entropy ( loc_x , scale_x ) for ( loc_x , scale_x ) in zip ( loc , scale ) ] )
vectorized version of stats .