Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
maroba committed Dec 11, 2024
1 parent 40b976d commit 71e40a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ from findiff import Diff

# define the grid:
x = np.linspace(0, 1, 100)
dx = x[1] - x[0] # the grid spacing

# the array to differentiate:
f = np.sin(x) # as an example

# Define the derivative:
d_dx = Diff(0, dx)
d_dx = Diff(0, x[1] - x[0])

# Apply it:
df_dx = d_dx(f)
Expand Down

0 comments on commit 71e40a6

Please sign in to comment.