stdlib
stdlib copied to clipboard
test: add tests to `@stdlib/ndarray/base/nullary`
Resolves #2229
Description
What is the purpose of this pull request?
This pull request:
- adds tests for
@stdlib/ndarray/base/nullary
Related Issues
Does this pull request have any related issues?
This pull request:
- resolves #2229
Questions
Any questions for reviewers of this pull request?
No.
Other
Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.
I added some edge cases for blockednullary2d up to blockednullary4d (same for related complex data types) to get 100% coverage. But I don't know if I used the most feasible methods. I'd like some insight into that, thanks.
Checklist
Please ensure the following tasks are completed before submitting this pull request.
- [x] Read, understood, and followed the contributing guidelines.
@stdlib-js/reviewers
@Planeshifter @kgryte Please review, thanks.
@kgryte @Planeshifter Ping, reminder.
@kgryte Sure. Thanks for the guidance.
@kgryte Hi, as I'm working through the refactoring, the expected array of dimension 7D+ is getting really large, 100s of elements. Here's the example shape, and stride for 7D
sh = [ 2, 2, 2, 2, 2, 2, 2 ];
st = [ 128, 64, 32, 16, 8, 2, 1 ];
Is this Okay or should I try to reduce it somehow?
You can use leading singleton dimensions. E.g., shape = [ 1, 1, 1, 1, 2, 2, 2 ] . To get full code coverage, you may need to use permutations (e.g., shape = [ 2, 1, 2, 1, 1, 1, 2 ], etc).
Alright, thanks.
@kgryte Please review, thanks.