usual me - 1 year ago 122

Python Question

So I know what the gradient of a (mathematical) function is, so I feel like I should know what

`numpy.gradient`

Return the gradient of an N-dimensional array.

What is the gradient of an array? When is

`numpy.gradient`

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Answer Source

The gradient is computed using central differences in the interior and first differences at the boundaries.

and

The default distance is 1

This means that in the interior it is computed as

where h = 1.0

and at the boundaries

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**