-
Notifications
You must be signed in to change notification settings - Fork 38
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
what to do about one and zero ? #47
Comments
I think just return the most structured version, so |
This is partially fixed: julia> one(Diagonal(Fill(1.0, 2))) # 3
2×2 Diagonal{Float64,Array{Float64,1}}:
1.0 ⋅
⋅ 1.0
julia> zero(Diagonal(Fill(1.0, 2)))
2×2 Diagonal{Float64,Array{Float64,1}}:
0.0 ⋅
⋅ 0.0
but still, would be better to return |
This is largely resolved now: julia> one(Diagonal(Fill(1.0, 2)))
2×2 Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}:
1.0 ⋅
⋅ 1.0
julia> zero(Diagonal(Fill(1.0, 2)))
2×2 Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}:
0.0 ⋅
⋅ 0.0 |
Is it good that they are |
Maybe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, we have this:
one
andzero
behave differently, but they probably should behave analogously.The documentation for
one
saysAnd for
zero
This says to me that, of the above examples, only number 2 is correct.
The text was updated successfully, but these errors were encountered: