Merged
Conversation
The error variants here should guide the user as to the wrong use of functions, instead of taking down the entire program with a panic, which is especially necessary in an embedded environment.
This however does not specify to the end user which arguments are raising the error. Fix "Conflict" typo in Error enum variant
Display trait is for when `main` ends and an error message is shown to the end user.
Contributor
Author
|
Rebased onto new main |
Contributor
Author
|
Perhaps some error conventions and things to consider as this develops into the future: https://sabrinajewson.org/blog/errors |
This version of ndarray-conv accounts for both cross-correlation and convolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed from #53, we begin the migration by first introducing the -core crate.
By using the version number as being 0.0.0, we show strictly that it's meant to be a internal crate.
I believe we can start defining the common traits necessary on non-NAN floats, integers etc here too. I am not sure at present if this conflicts with the internal crate requirement.
Currently just providing a minimal set of Error enums as cherry-picked, with non-allocating variants.
The fmt::Display for the error and a README.md is to be decided in the future.
Edit:
The results as shown in #78 and #86 might show that the current Errors might be strictly insufficient are require more thought. It might be worth seriously considering
anyhow.Note
Introduce new
sci-rs-corecrate with no_std-ready core error types, feature gates, and base deps.sci-rs-corewithno_stdsupport and feature flags.alloc(default),std(enablesalloc).all-features = true.ndarray,ndarray-conv,num-traits(minimal default features).Errorenum withInvalidArgandConflictArgvariants.String) underalloc.allocis disabled.fmt::Displayandcore::error::Errorimpls with conditional messaging.Result<T>type alias tocore::result::Result<T, Error>.sci-rs-core/Cargo.tomlsci-rs-core/src/lib.rsWritten by Cursor Bugbot for commit f21a6bc. This will update automatically on new commits. Configure here.