How numpy random choice works: Generator.choice vs legacy, replace=False, weights, seeds for reproducible sampling, and fixes for common ValueErrors. Researchers use random selection to draw a sample ...