Skip to content

Commit 88cc86a

Browse files
committed
Return a signed integer to be consistent with other assertion packages
1 parent 9c1300b commit 88cc86a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/ndarray/base/assert/is-contiguous/benchmark/c/benchmark.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ double rand_double() {
9595
*/
9696
double benchmark() {
9797
double elapsed;
98-
uint8_t b;
98+
int8_t b;
9999
double t;
100100
int i;
101101

lib/node_modules/@stdlib/ndarray/base/assert/is-contiguous/include/stdlib/ndarray/base/assert/is_contiguous.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern "C" {
3131
/**
3232
* Determines if an array is contiguous.
3333
*/
34-
uint8_t stdlib_ndarray_is_contiguous( int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset );
34+
int8_t stdlib_ndarray_is_contiguous( int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset );
3535

3636
#ifdef __cplusplus
3737
}

lib/node_modules/@stdlib/ndarray/base/assert/is-contiguous/src/main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
* int64_t strides[] = { 10, 1 };
4343
* int64_t offset = 0;
4444
*
45-
* uint8_t b = stdlib_ndarray_is_contiguous( ndims, shape, strides, offset );
45+
* int8_t b = stdlib_ndarray_is_contiguous( ndims, shape, strides, offset );
4646
* // returns 1
4747
*/
48-
uint8_t stdlib_ndarray_is_contiguous( int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset ) {
48+
int8_t stdlib_ndarray_is_contiguous( int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset ) {
4949
if (
5050
stdlib_ndarray_iteration_order( ndims, strides ) != 0 &&
5151
stdlib_ndarray_is_single_segment_compatible( ndims, shape, strides, offset ) != 0

0 commit comments

Comments
 (0)