Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign error in the bin edges calculation in the definition in docs/shearstrain.ipynb ? #111

Closed
opinner opened this issue Nov 22, 2023 · 0 comments · Fixed by #112
Closed

Comments

@opinner
Copy link

opinner commented Nov 22, 2023

Bin edges are calculated as

depth_bin_edges = np.concatenate(
    (
        [np.min(depth_bin) - dz / 2],
        0.5 * (depth_bin[1:] + depth_bin[:-1]),
        [np.max(depth_bin) - dz / 2],
    )
)

This leads to an array of edges with the same last and second-to-last element.
Shouldn't it be:

depth_bin_edges = np.concatenate(
    (
        [np.min(depth_bin) - dz / 2],
        0.5 * (depth_bin[1:] + depth_bin[:-1]),
        [np.max(depth_bin) + dz / 2],
    )
)

with the sign changed in the last line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant