November 2017
Beginner
316 pages
6h 40m
English
In the preceding sections, we worked with matrices and multidimensional arrays. In our examples, the arrays and matrices are filled with values. In many scenarios, there could be lots of zeroes.
When there are more zeroes than cells with values, it is recommended to store them in an efficient and specially designed data structure for sparse matrices:
julia> sm = spzeros(5,5)5×5 sparse matrix with 0 Float64 nonzero entries# assigning a valuejulia> sm[1,1] = 1010julia> sm5×5 sparse matrix with 1 Float64 nonzero entries:[1, 1] = 10.0
In this section, we studied and worked on arrays, matrices, multidimensional arrays, and sparse matrices. In the next section, we will study a special data structure called DataFrames. ...
Read now
Unlock full access