np_random_choice
Generate random samples from a 1-D array, controlling sample size and whether sampling with replacement.
Instructions
Generates a random sample from a given array.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | 1-D array-like object from which to sample. | |
| size | No | Output shape (default: None, returns single value). | |
| replace | No | Whether sampling with replacement (default: True). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |