oh... hah, misread that 9x as 9%. my bad :)


On Sat, Apr 12, 2014 at 11:53 AM, Jorge Cañardo Alastuey <
notifications@github.com> wrote:

> In skbio/maths/_subsample.pyx:
>
> > +
> > +    >>> sub = subsample([1, 0, 1, 2, 2, 3, 0, 1], 5, replace=True)
> > +    >>> sub.sum()
> > +    5
> > +    >>> sub.shape
> > +    (8,)
> > +
> > +    """
> > +    cdef cnp.ndarray[cnp.int64_t, ndim=1] result, permuted, unpacked
> > +    cdef cnp.int64_t cnt, unpacked_idx, i, j
> > +
> > +    if n < 0:
> > +        raise ValueError("n cannot be negative.")
> > +
> > +
> > +    counts = np.asarray(counts)
>
> 900% faster!
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/biocore/scikit-bio/pull/262/files#r11560765>
> .
>