def METHOD_NAME(src, bins, weights):
    eps = 1.0e-8
    src_array = np.array(src)
    bins_array = np.array(bins)
    weights_array = np.array(weights)
    np_out, np_bins_out = np.histogram(
        src_array, bins_array, weights=weights_array
    )
    num_out, num_bins_out = num.histogram(
        src_array, bins_array, weights=weights_array
    )
    assert allclose(np_out, num_out, atol=eps)
    assert allclose(np_bins_out, num_bins_out, atol=eps)