Implement approx traits for ArrayBase#581
Implement approx traits for ArrayBase#581LukeMathWalker merged 26 commits intorust-ndarray:masterfrom
Conversation
|
I think it should be behind a feature flag, as long as we don't use it in the library itself to provide other functionalities. There are similar nice-to-have trait implementations which are not core (i.e. |
|
Are the fate of |
|
I'd like to change the implementation to take advantage of the new I don't think we should implicitly broadcast, at least for the initial version, just to keep things simple and explicit. (The user can to perform a broadcast themselves with I'm not sure what to do about |
|
I agree on Broadcasting is forward-compatible, so it's fine to go out with a more explicit approach first. |
|
I have some free time, so I am working on a branch to finalize this (use |
Polish approx
|
I accidentally broke this (the approx impls must match the |
|
It seems to be working now 👍 |
|
I just noticed that there are a few things to fix, which I'm working on now. (Tests annotated with |
|
My bad, silent failure 😅 |
|
No worries, that's a really easy mistake to make. I'm surprised the compiler didn't give a warning about it. This PR looks ready to merge (assuming CI passes). |
This implements the traits from the
approxcrate forArrayBase. A couple of questions:.all_close()does?.all_close()now?One other note: The traits currently require the rhs to have type
Self, which means comparisons don't work for differing storage types. We can fix this once brendanzab/approx#48 is merged.