Fixes spatial pooler to use rng.sample.