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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"a": "<a>"
},
"name": "np_random_choice"
}
}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 |