Skip to content

How to drop zeros for a matrix ? #539

Open
@galaxy001

Description

@galaxy001

From GraphBLAS/LAGraph#28, C-API can use GrB_assign (A, A, NULL, A, GrB_ALL, nrows, GrB_ALL, ncols, Replace) ; to drop zeros for A. But A[:A.nrows, :A.ncols] = A[:A.nrows, :A.ncols] does not work.

I need to count non-zero items columnwise. But gb.binary.gt(mxIn , 0) is BOOL and cannot do sum, gb.unary.one(mxIn).new() just set every element to one including zeros and false(s).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy