code: def choose(n, k):
    
    if isinstance(k, numbers.Number):
      return _choose(n, k)
    else:
      return np.array([_choose(n, k2) for k2 in k])
docs: Computes "n choose k". This can handle higher values than
    scipy.special.binom().