daphne-project/daphne

Picking input file format for readMatrix()

开放

#370 创建于 2022年5月18日

 (5 条评论) (0 个反应) (0 位负责人)C++ (84 个派生)auto 404
buggood first issue

仓库指标

星标
 (80 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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]$ 

贡献者指南