np_diff
Calculate the n-th discrete difference of an array along a specified axis, useful for detecting changes or gradients in sequential data.
Instructions
Calculate the n-th discrete difference along the given axis.
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": {
"array": "<array>"
},
"name": "np_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| array | Yes | The input array. | |
| n | No | The number of times values are differenced (default: 1). | |
| axis | No | The axis along which to difference (default: 0). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |