Skip to content

Commit

Permalink
MAINT: improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip authored and charris committed Dec 27, 2018
1 parent 016072e commit b43a1aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion numpy/core/src/common/array_assign.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ raw_array_is_aligned(int ndim, npy_intp *shape,
return 1;
}
else {
/* always return false for alignment == 0, which means unaligned */
/* always return false for alignment == 0, which means cannot-be-aligned */
return 0;
}
}
Expand Down
5 changes: 3 additions & 2 deletions numpy/core/src/common/array_assign.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ broadcast_strides(int ndim, npy_intp *shape,

/*
* Checks whether a data pointer + set of strides refers to a raw
* array whose elements are all aligned to a given alignment.
* array whose elements are all aligned to a given alignment. Returns
* 1 if data is aligned to alignment or 0 if not.
* alignment should be a power of two, or may be the sentinel value 0 to mean
* unaligned, in which case false is always returned.
* cannot-be-aligned, in which case 0 (false) is always returned.
*/
NPY_NO_EXPORT int
raw_array_is_aligned(int ndim, npy_intp *shape,
Expand Down

0 comments on commit b43a1aa

Please sign in to comment.