Hi there,
I’m struggling with creating a multi dimensional array (Dominoes).
after
stones = [2 1 false; 2 3 false; 1 3 false]
it says:
3×3 Matrix{Int64}:
2 1 0
2 3 0
1 3 0
a “Matrix” is said to be a 2-dimensional array.
so the 3x3 is confusing me.
when typing
stones[1]
stones[2] or
stones[3]
only the first entry are shown:
julia> stones[1]
2
julia> stones[2]
2
julia> stones[3]
1
how can I access the entries 2 and 3?
I’d be very happy if anyone could give any hint how to manage this.
the Julia help is also not very helpful:
julia> B = Array{Float64}(undef, 4) # N determined by the input
4-element Vector{Float64}:
2.360075077e-314
NaN
2.2671131793e-314
2.299821756e-314
julia> similar(B, 2, 4, 1) # use typeof(B), and the given size
2×4×1 Array{Float64, 3}:
[:, :, 1] =
2.26703e-314 2.26708e-314 0.0 2.80997e-314
0.0 2.26703e-314 2.26708e-314 0.0
my question: how are the values, e.g. 2.360075077e-314 built?
here it is:
4-element Vector{Float64}:
2.0e-323
NaN
2.5e-323
0.0
I got it,
stones[4,3]
it was easy, but didn’t find it in any Julia doc.
3 rows, 3 columns, so 3x3.
We’ve written that concept, though you may not have reached it yet in the syllabus.
The longer version of the concept document is only shown to you after finishing the exercise. If you want to see it earlier, it (and everything else) is on GitHub.
Thanks a lot Colin,
now having a few more hints (from you),
I saw that in the “key concepts” overview the Multidimensional Arrays concept is still greyed out and so locked for me.
It seems I was a bit to fast…
and making wanting to take three steps up the staircase in one go.
But during search I found how you planed the concepts an exercises in last autumn an how you find helpers (e.g. depial)
which is also interesting.
Hope I can join the team one day as I progress!
have a nice day and a good time!
Nisang
Many Exercism tracks are closed to community contributions (the maintainers got overwhelmed and very stressed by well-meaning but inappropriate PRs), but the Julia track is open. If you want to contribute, I recommend starting small: typo fixes, clarify wording in the learning syllabus, add practice exercises…
I don’t know what other languages you are interested in, but I’m also a maintainer for the R track, and welcome contributions there.
Conversely, please don’t mess with the Python or JS tracks, which are incredibly busy and hard to maintain. All maintainers are unpaid volunteers, with limited time to invest in Exercism.