Skip to content

Commit cd9ab34

Browse files
committed
Refactor in function names
1 parent b7bae8e commit cd9ab34

3 files changed

Lines changed: 92 additions & 73 deletions

File tree

differentiation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44

55

6-
def derivative_backward_difference(x, y):
6+
def backward_difference(x, y):
77
"""Calculate the first derivative.
88
99
All values in 'x' must be equally spaced.
@@ -37,7 +37,7 @@ def dy_difference(h, y0, y1):
3737
return [dy]
3838

3939

40-
def derivative_three_point(x, y):
40+
def three_point(x, y):
4141
"""Calculate the first derivative.
4242
4343
All values in 'x' must be equally spaced.
@@ -75,7 +75,7 @@ def dy_end(h, y0, y1, y2):
7575
return [dy]
7676

7777

78-
def derivative_five_point(x, y):
78+
def five_point(x, y):
7979
"""Calculate the first derivative.
8080
8181
All values in 'x' must be equally spaced.

integration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Methods for numerical integration."""
22

33

4-
def composite_simpson(f, b, a, n):
4+
def simpson(f, b, a, n):
55
"""Calculate the integral from 1/3 Simpson's Rule.
66
77
Args:
@@ -29,7 +29,7 @@ def composite_simpson(f, b, a, n):
2929
return [xi]
3030

3131

32-
def composite_trapezoidal(f, b, a, n):
32+
def trapezoidal(f, b, a, n):
3333
"""Calculate the integral from the Trapezoidal Rule.
3434
3535
Args:
@@ -53,7 +53,7 @@ def composite_trapezoidal(f, b, a, n):
5353
return [xi]
5454

5555

56-
def composite_simpson_array(x, y):
56+
def simpson_array(x, y):
5757
"""Calculate the integral from 1/3 Simpson's Rule.
5858
5959
Args:
@@ -82,7 +82,7 @@ def composite_simpson_array(x, y):
8282
return [xi]
8383

8484

85-
def composite_trapezoidal_array(x, y):
85+
def trapezoidal_array(x, y):
8686
"""Calculate the integral from the Trapezoidal Rule.
8787
8888
Args:

0 commit comments

Comments
 (0)