I hereby claim:
- I am douglasdavis on github.
- I am ddavis_ (https://keybase.io/ddavis_) on keybase.
- I have a public key whose fingerprint is 2327 53AA 7537 5A62 5190 A308 18BB BE8C 694A 7ECE
To claim this, I am signing this object:
import numpy as np | |
from fast_histogram import histogram1d | |
import math | |
def my_slow(x, xlim=(0,10), nbins=None, weights=None, overflow=False, density=False): | |
if nbins is None: | |
nbins = int(math.pow(len(x), 0.33333)) | |
if overflow and weights is not None: | |
under = x < xlim[0] | |
over = x > xlim[1] |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
import uproot | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib as mpl | |
mpl.rcParams['axes.labelsize'] = 12 | |
mpl.rcParams['legend.fontsize'] = 12 | |
mpl.rcParams['legend.frameon'] = False |
#ifndef TYPE_HPP | |
#define TYPE_HPP | |
#include <string> | |
#include <typeinfo> | |
std::string demangle(const char* name); | |
template <class T> | |
std::string type(const T& t) { |
int main(int argc, char* argv[]) { | |
if ( argc < 3 ) { | |
std::cout << "give arguments" << std::endl; | |
return 0; | |
} | |
std::string inputDS = argv[1]; | |
std::string outputDS = argv[2]; | |
// use would be: | |
// $ runMyAlgorithm <input> <output> |
// if sigHist is a TH1F* and bkgHist is a TH1F* (with the same number of bins!) | |
int nbins = sigHist->GetNbinsX(); | |
// get the total integrals for each histogram | |
float sig_integral = sigHist->Integral(1,nbins); | |
float bkg_integral = bkgHist->Integral(1,nbins); | |
// create containers sig = x points, bkg = y points | |
std::vector<float> sigPoints(nbins); |