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

Pass dimensions as an array #53

Closed
wkearn opened this issue Jul 24, 2024 · 0 comments · Fixed by #61
Closed

Pass dimensions as an array #53

wkearn opened this issue Jul 24, 2024 · 0 comments · Fixed by #61
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@wkearn
Copy link
Contributor

wkearn commented Jul 24, 2024

I merged TopoToolbox/libtopotoolbox#69, which changes the libtopotoolbox API to take a ptrdiff_t dims[2] instead of two separate arguments nrows and ncols. We should update the pytopotoolbox bindings accordingly.

For row-major arrays, one would create ptrdiff_t dims[2] = {ncols,nrows}, while for column-major arrays one uses ptrdiff_t dims[2] = {nrows,ncols}.

Ideally we would be able to pass the dimensions in the correct order and then skip the reordering steps that we introduced in #51.

I am not sure if it makes more sense to create the dims object in Python and pass it to the C++ binding or if we should pass the dimensions separately along with some kind of row/column major flag to the C++ binding and organize the dims array there.

This change will show up in the 2024-W31 release of libtopotoolbox on 29-07-2024.

@wkearn wkearn added enhancement New feature or request good first issue Good for newcomers labels Jul 26, 2024
@Teschl Teschl mentioned this issue Aug 16, 2024
@wkearn wkearn closed this as completed in #61 Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant