-
Notifications
You must be signed in to change notification settings - Fork 40
_fill_dot
support general vectors
#229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
_fill_dot
support more infinite zero vectors_fill_dot
support general infinite zero vectors
Codecov Report
@@ Coverage Diff @@
## master #229 +/- ##
==========================================
+ Coverage 99.04% 99.19% +0.14%
==========================================
Files 4 4
Lines 630 622 -8
==========================================
- Hits 624 617 -7
+ Misses 6 5 -1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Using julia> sum(fill(Int8(1),5)) |> typeof
Int64
julia> reduce(+, fill(Int8(1),5)) |> typeof
Int8
|
Julia intentionally let |
I'm accepting the rounding-off errors (See failed test) since I don't know how to work around. I tend to believe the default dot has larger errors. |
Checking for |
I've found another problem... For infinite vectors, if one of them is zero and another is well-defined, then the However, if the other vector has Most of the issues can be resolved by adding if-elses. The hard part is to tell whether an infinite vector with infinite sum actually contains The infinite case is also not type-stable, since the result could easily be |
Co-authored-by: Sheehan Olver <solver@mac.com>
_fill_dot
support general infinite zero vectors_fill_dot
support general vectors
sorry for the ping, inferred 😅 |
Is this Ready to merge? |
yes |
* StepRangeLen to support 0 step size in cumsum #226 (#230) * use StepRangeLen to support 0 step size * v0.13.11 * allow special casing on ∞ length * Restore ± special cases * Update runtests.jl * fix more tests * Update runtests.jl * Structured Broadcasting (#228) * Structured Broadcasting * add jishnubs tests * Update runtests.jl * Fix #97 by adding promote_rules (#234) * Move OneElement from Zygote and overload setindex (#161) (#235) * Add Zeros(T, n...) and Ones(T, n...) constructors (#94( (#233) * Add Zeros(T, n...) and Ones(T, n...) constructors (#94( * increase coverage * Update README.md * Move over OneElement from Zygote * Add tests * Update oneelement.jl * add tests * Update runtests.jl * add docs * ensure type in array convert (#237) * increase coverage * add convert tests * v1.0 * `_fill_dot` support general vectors (#229) * Update fillalgebra.jl * promote_op * add breaking test * add breaking test * fix * accept round-off errors * Update test/runtests.jl Co-authored-by: Sheehan Olver <solver@mac.com> * update * support inf and nan * fix 1.6 * Update fillalgebra.jl * Update fillalgebra.jl * trying to fix Julia 1.6 * comments * Update runtests.jl * add @inferred --------- Co-authored-by: Sheehan Olver <solver@mac.com> --------- Co-authored-by: Jishnu Bhattacharya <jishnub.github@gmail.com> Co-authored-by: Tianyi Pu <44583944+putianyi889@users.noreply.github.com>
including Inf, NaN and nested arrays. Infinite cases should be implemented in InfiniteArrays.jl
Original PR:
including
Fill(0,∞)
and potentially0.0:0.0:+∞
in the futurealso fix a type issue: