def get_profile_histogram(x, y, n_bins=<NUM_LIT:100>):
if len(x) != len(y):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>y = y.astype(np.float32)<EOL>n, bin_edges = np.histogram(x, bins=n_bins)  <EOL>sy = np.histogram(x, bins=n_bins, weights=y)[<NUM_LIT:0>]  <EOL>sy2 = np.histogram(x, bins=n_bins, weights=y * y)[<NUM_LIT:0>]  <EOL>bin_centers = (bin_edges[<NUM_LIT:1>:] + bin_edges[:-<NUM_LIT:1>]) / <NUM_LIT:2>  <EOL>mean = sy / n  <EOL>std = np.sqrt((sy2 / n - mean * mean))  <EOL>std_mean = std / np.sqrt((n - <NUM_LIT:1>))<EOL>mean[np.isnan(mean)] = <NUM_LIT:0.><EOL>std_mean[np.isnan(std_mean)] = <NUM_LIT:0.><EOL>return bin_centers, mean, std_mean<EOL>
Takes 2D point data (x,y) and creates a profile histogram similar to the TProfile in ROOT. It calculates
    the y mean for every bin at the bin center and gives the y mean error as error bars.

    Parameters
    ----------
    x : array like
        data x positions
    y : array like
        data y positions
    n_bins : int
        the number of bins used to create the histogram