diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 04d10b5..07d05f9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,7 +1,7 @@ name: Lint on: - push: { branches: [ "master" ] } - pull_request: { branches: [ "master" ] } + push: { branches: [ "main" ] } + pull_request: { branches: [ "main" ] } concurrency: group: lint-${{ github.ref }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f225e37..ab2de1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ name: Test on: - push: { branches: [ "master" ] } - pull_request: { branches: [ "master" ] } + push: { branches: [ "main" ] } + pull_request: { branches: [ "main" ] } concurrency: group: test-${{ github.ref }} diff --git a/ec_tools/semi_integration.py b/ec_tools/semi_integration.py index 322cd4c..4777f9c 100644 --- a/ec_tools/semi_integration.py +++ b/ec_tools/semi_integration.py @@ -48,14 +48,14 @@ def semi_integration(y, q=-0.5, delta_x=1, c1=8, c2=2): TEST: >>> from scipy.integrate import cumulative_trapezoid >>> x = np.linspace(0,1000, 1001) - >>> Δx = x[1] - x[0] + >>> delta_x = x[1] - x[0] >>> y = np.array([1]*1001) - >>> np.allclose(semi_integration(semi_integration(y, delta_x=Δx), Δx=Δx), cumulative_trapezoid(y,x,initial=0), rtol=2.5e-03) + >>> np.allclose(semi_integration(semi_integration(y, delta_x=delta_x), delta_x=delta_x), cumulative_trapezoid(y,x,initial=0), rtol=2.5e-03) True >>> x = np.linspace(0,1000, 10001) - >>> Δx = x[1] - x[0] + >>> delta_x = x[1] - x[0] >>> y = np.array([1]*10001) - >>> np.allclose(semi_integration(semi_integration(y, delta_x=Δx), Δx=Δx), cumulative_trapezoid(y,x,initial=0), rtol=5e-03) + >>> np.allclose(semi_integration(semi_integration(y, delta_x=delta_x), delta_x=delta_x), cumulative_trapezoid(y,x,initial=0), rtol=5e-03) True """ N = y.size diff --git a/environment.yml b/environment.yml index 7a2bd7e..d354956 100644 --- a/environment.yml +++ b/environment.yml @@ -10,3 +10,4 @@ dependencies: - pylint - pytest - pytest-doctestplus + - scipy