Thx Tim:) I have !
julia> A=read(dset)[:,1:2]
5x2 sparse matrix with 0 Int64 entries:

julia> fid = jldopen("S.jld","r")
Julia data file version 0.0.2: S.jld

julia> dset=fid["S"]
JldDataset(HDF5 dataset: /S (file: S.jld),Julia data file version 0.0.2: S.jld)

julia> A=read(dset)[1:3,:]
3x18 sparse matrix with 2 Int64 entries:
        [1 ,  4]  =  1
        [3 , 18]  =  -5

julia> full(A)
3x18 Array{Int64,2}:
 0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0   0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0   0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  -5

julia> full(S)
ERROR: S not defined

julia> full(read(dset))
5x18 Array{Int64,2}:
 0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0   0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0   0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  -5
 0  0  0  0  0  0  2  0  0  0  0  0  0  0  0  0  0   0
 0  0  0  0  0  0  0  0  3  0  0  0  0  0  0  0  0   0

julia>
Paul

W dniu 2014-08-17 20:25, paul analyst pisze:
Big thx, it work !
Paul

W dniu środa, 13 sierpnia 2014 13:42:09 UTC+2 użytkownik Andreas Noack napisał:

    This one is a bit tricky. The reason is that L is a Matrix and
    F[:,1] is a vector. Try F[:,1][vec(L.==0)]

    Med venlig hilsen

    Andreas Noack


    2014-08-13 7:06 GMT-04:00 paul analyst <[email protected]
    <javascript:>>:

        F is dense
        julia> size(F)
        (6237437,284)

        julia> size(L)
        (6237437,1)

        julia> F[:,1][L.==0]
        ERROR: BoundsError()
         in getindex_bool_1d at array.jl:285

        julia> L
        6237437x1 sparse matrix with 20869 Int16 entries:
                [66     ,       1]  =  1
                [104    ,       1]  =  0

        Paul



Reply via email to