daphne-project/daphne

Picking input file format for readMatrix()

Ouverte

#370 ouverte le 18 mai 2022

 (5 commentaires) (0 réaction) (0 personne assignée)C++ (84 forks)auto 404
buggood first issue

Métriques du dépôt

Stars
 (80 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

Using --select-matrix-repr seems to result in different output when reading from a file using readMatrix().

I manually created a .csv and .csv.meta file to show a minimal example.

../dataset/test/matrix_0.csv

1,0,0,0,0
1,0,0,0,0
0,0,0,0,0
0,0,0,0,0
0,0,0,0,0

../dataset/test/matrix_0.csv.meta

5,5,1,f64,nnz=2

build/bin/daphne test/api/cli/io/readSparse.daphne

M = readMatrix($filename);
print(M);

Output:

[jonny@biostar]$ ./build/bin/daphne test/api/cli/io/readSparse.daphne filename=\"../dataset/test/matrix_0.csv\"
DenseMatrix(5x5, double)
1 0 0 0 0
1 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
[jonny@biostar]$ ./build/bin/daphne --select-matrix-repr test/api/cli/io/readSparse.daphne filename=\"../dataset/test/matrix_0.csv\"
CSRMatrix(5x5, double)
0 0 0 0 0
1 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
[jonny@biostar]$ 

Guide contributeur