Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
maroba authored Apr 1, 2018
1 parent 7cccda2 commit 4d57717
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ the grid spacing to the `FinDiff` constructor, you give it the coordinates:

```python
import numpy as np
from findiff import FinDiff

# A non-uniform 3D grid:
x = np.r_[np.arange(0, 4, 0.05), np.arange(4, 10, 1)]
Expand All @@ -93,7 +94,7 @@ X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
f = np.exp(-X**2-Y**2-Z**2)

# Define the partial derivative with respect to y, e.g.
d_dy = fd.diff.FinDiff(coords=[x, y, z], dims=[1])
d_dy = FinDiff(coords=[x, y, z], dims=[1])

# Apply it to f
fy = d_dy(f)
Expand Down

0 comments on commit 4d57717

Please sign in to comment.