Skip to content

downsampleMatrix returns sparse when it should return dense result #32

@mschubert

Description

@mschubert

The ?scuttle::downsampleMatrix documentation states:

By default, the output format will be a dense matrix for an ordinary matrix ‘x’, and a sparse matrix for any sparse format (i.e., if ‘is_sparse(x)’ returns ‘TRUE’).

However, I get a sparse result for a dense input in scuttle_1.14.0:

scuttle::downsampleMatrix(matrix(1000), prop=0.5)
# 1 x 1 sparse Matrix of class "dgCMatrix"
#
# [1,] 500

It seems that either the behavior or the documentation is wrong here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions