You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting prune_numerical_zeros=False when creating a BSR matrix using the warp.sparse.bsr_from_triplets() does not function the same in versions 1.8.0 compared to 1.7.2. The following example will print an array of -1s in version 1.8.0. In 1.7.2 the sorted row indices are returned
importwarpaswpimportwarp.sparseassparsewp.init()
rows=wp.array([1,0,2,3],dtype=int)
cols=wp.array([0,1,2,3],dtype=int)
vals=wp.zeros(len(rows),dtype=float)
# Create BSR matrixA=sparse.bsr_from_triplets(
rows_of_blocks=12, # Number of rows of blockscols_of_blocks=12, # Number of columns of blocksrows=rows, # Row indicescolumns=cols, # Column indicesvalues=vals, # Block valuesprune_numerical_zeros=False
)
print(A.uncompress_rows().numpy())