feat: add C implementation for stats/base/ndarray/sminsorted - #14358
AryanSharma48 wants to merge 9 commits into
Conversation
Signed-off-by: Aryan Sharma <aryansharma24106@gmail.com>
stats/base/ndarray/sminsorted
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
@stdlib-js/reviewers The PR is up-to-date with |
|
@ujjwalv01 Mind doing a first pass review over this PR? Cheers! |
Done, left a few small suggestions. Rest LGTM! |
Co-authored-by: Ujjwal Verma <ujjwalverma010305@gmail.com> Signed-off-by: Aryan Sharma <aryansharma24106@gmail.com>
…bs, and C formatting Signed-off-by: Aryan Sharma <aryansharma24106@gmail.com>
|
Thanks @ujjwalv01 for the review! I've applied all your suggestions, updated the copyright years to 2026, adjusted the JSDoc description verb in (Please excuse the mistyped commit title on the previous push, accidentally had This should be good for final review now! |
| count = 0; | ||
| for ( i = MIN; i <= MAX; i++ ) { | ||
| len = pow( 10, i ); | ||
| iter = ITERATIONS / pow( 10, i - 1 ); |
There was a problem hiding this comment.
| iter = ITERATIONS / pow( 10, i - 1 ); | |
| iter = ITERATIONS / pow( 10, i-1 ); |
| int64_t shape[] = { 4 }; | ||
|
|
||
| // Specify the array strides: | ||
| int64_t strides[] = { 2 * STDLIB_NDARRAY_FLOAT32_BYTES_PER_ELEMENT }; |
There was a problem hiding this comment.
| int64_t strides[] = { 2 * STDLIB_NDARRAY_FLOAT32_BYTES_PER_ELEMENT }; | |
| int64_t strides[] = { 2*STDLIB_NDARRAY_FLOAT32_BYTES_PER_ELEMENT }; |
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2025 The Stdlib Authors. | ||
| * Copyright (c) 2026 The Stdlib Authors. |
There was a problem hiding this comment.
| * Copyright (c) 2026 The Stdlib Authors. | |
| * Copyright (c) 2025 The Stdlib Authors. |
| // MAIN // | ||
|
|
||
| /** | ||
| * Compute the minimum value of a sorted one-dimensional single-precision floating-point ndarray. |
There was a problem hiding this comment.
| * Compute the minimum value of a sorted one-dimensional single-precision floating-point ndarray. | |
| * Computes the minimum value of a sorted one-dimensional single-precision floating-point ndarray. |
| * @license Apache-2.0 | ||
| * | ||
| * Copyright (c) 2025 The Stdlib Authors. | ||
| * Copyright (c) 2026 The Stdlib Authors. |
There was a problem hiding this comment.
| * Copyright (c) 2026 The Stdlib Authors. | |
| * Copyright (c) 2025 The Stdlib Authors. |
| @license Apache-2.0 | ||
|
|
||
| Copyright (c) 2025 The Stdlib Authors. | ||
| Copyright (c) 2026 The Stdlib Authors. |
There was a problem hiding this comment.
| Copyright (c) 2026 The Stdlib Authors. | |
| Copyright (c) 2025 The Stdlib Authors. |
| int64_t shape[] = { 4 }; | ||
|
|
||
| // Specify the array strides: | ||
| int64_t strides[] = { 2 * STDLIB_NDARRAY_FLOAT32_BYTES_PER_ELEMENT }; |
There was a problem hiding this comment.
| int64_t strides[] = { 2 * STDLIB_NDARRAY_FLOAT32_BYTES_PER_ELEMENT }; | |
| int64_t strides[] = { 2*STDLIB_NDARRAY_FLOAT32_BYTES_PER_ELEMENT }; |
|
@AryanSharma48 , I think you made some changes in commit : 1373193 which are not correct, suggested a few changes; |
Part of #14034.
Description
This pull request:
@stdlib/stats/base/ndarray/sminsorted.@stdlib/stats/strided/sminsorted.stdlib_base_ndarray_sminsorted.Related Issues
This pull request has the following related issues:
@stdlib/stats/base/ndarraypackages (tracking issue) #14034Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
I used AI assistance (Cursor/LLM) to help research on the existing canonical reference packages (
snanmin,smean), followed by code implementatio, review, linting, and local test verification.@stdlib-js/reviewers