TopoToolbox / TopoToolbox/libtopotoolbox

Permit different array strides for fillsinks

Open
#23 3 comments 0 reactions 1 assignee View on GitHub

@wkearn is already working on this.

Since Apr 9, 2024.

enhancement
Dominant language
C
Stars
2
Forks
11
PR merge metrics
No merged PRs in 30d

Description

fillsinks currently assumes that arrays are stored in column-major order: the dimension with size nrows should vary the fastest. This follows MATLAB, Fortran and Julia practice but the default NumPy array storage is column-major, and we need to copy NumPy arrays to a new storage order to ensure that the morphological reconstruction is done correctly. Column-major order is not a strict requirement of the morphological reconstruction algorithm, which only needs the strides of each dimension to compute the neighborhood of a given pixel. If we explicitly pass in the strides, we should be able to operate on row- or column-major data and on subsets or views of data without requiring copies.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.