Skip to content

Commit

Permalink
fix issue with sample
Browse files Browse the repository at this point in the history
  • Loading branch information
9il committed Nov 7, 2018
1 parent 7f14051 commit 7f55e21
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/mir/random/algorithm.d
Expand Up @@ -15,7 +15,7 @@ import mir.primitives: hasLength;
import mir.random;
import mir.random.ndvariable: isNdRandomVariable;
import mir.random.variable: isRandomVariable;
import std.range.primitives: isInputRange, isForwardRange;
import std.range.primitives: isInputRange, isForwardRange, popFrontExactly;
import std.traits;
public import mir.random.engine;
import mir.ndslice.slice: Slice;
Expand Down Expand Up @@ -512,6 +512,12 @@ nothrow @safe version(mir_random_test) unittest
}
}

@nogc nothrow version(mir_random_test) unittest
{
__gshared size_t[] arr = [1, 2, 3];
auto res = rne.sample(arr, 1);
}

/++
Lazy input or forward range containing a random sample.
$(LREF VitterStrides) is used to skip elements.
Expand Down

0 comments on commit 7f55e21

Please sign in to comment.