Skip to content

Commit

Permalink
Fix comments and clarify docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoBektesevic committed Nov 2, 2023
1 parent fd8b0f1 commit c443edb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/kbmod/search/geom.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ inline auto manhattan_neighbors(const Point& p, const unsigned width, const unsi
// point is negative or (0, 0)
auto idx = p.to_index();

// top-left bot-right
// top-left bot-left
if (idx.j >= 0 && idx.j < width) {
if (idx.i >= 0 && idx.i < height) idxs[0] = {idx.i, idx.j};
if (idx.i + 1 >= 0 && idx.i + 1 < height) idxs[3] = {idx.i + 1, idx.j};
}

// bot-right
// top-right
if (idx.i >= 0 && idx.i < height)
if (idx.j + 1 >= 0 && idx.j + 1 < width) idxs[1] = {idx.i, idx.j + 1};

Expand Down
4 changes: 3 additions & 1 deletion src/kbmod/search/pydocs/geom_docs.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ static const auto DOC_Index = R"doc(
Array index.
Index can be compared to tuples and cast to a NumPy structured array.
Index will cast non-int types into an integer without rounding.
Index will cast non-int types into an integer without rounding, i.e.
without applying ``floor`` or ``ceil`` to round the value to the
nearest integer.
Parameters
----------
Expand Down

0 comments on commit c443edb

Please sign in to comment.