Skip to content

Commit

Permalink
Merge branch 'feature/v0.4.7' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Dec 24, 2024
2 parents 62ae8bc + 0ca6475 commit ec99e04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion colour/utilities/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2401,7 +2401,9 @@ def centroid(a: ArrayLike) -> NDArrayInt:

a_ci.append(np.sum(axis * a) // a_s)

return as_int_array(a_ci)
# NOTE: Cannot use `as_int_array` as presence of NaN will raise a ValueError
# exception.
return np.array(a_ci).astype(DTYPE_INT_DEFAULT)


def fill_nan(
Expand Down

0 comments on commit ec99e04

Please sign in to comment.