ENH Define fused types so only two functions are generated.
Merge pull request #2720 from amueller/chi2_fused_types

MRG define fused types in chi2 for less code