Skip to content
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 are fill, zeros, falses doing? #121

Open
jariji opened this issue Apr 7, 2023 · 0 comments
Open

What are fill, zeros, falses doing? #121

jariji opened this issue Apr 7, 2023 · 0 comments

Comments

@jariji
Copy link

jariji commented Apr 7, 2023

julia> fill(42, dict)
3-element Dictionary{String,Int64}
 "a"42
 "b"42
 "c"42

julia> zeros(dict)
3-element Dictionary{String,Float64}
 "a"0.0
 "b"0.0
 "c"0.0

Does this correspond to the API of these functions in Base? I don't quite see the intent here.

julia> zeros([1,2,3])
ERROR: MethodError: no method matching zeros(::Vector{Int64})


julia> fill(9, [1,2,3])
ERROR: MethodError: no method matching fill(::Int64, ::Vector{Int64})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant