2 years ago

#52231

test-img

Victoria Sanchez-Apellaniz

How to convert a sparse 2D array in COO to a dense 2D array?

I need to write a Python function sparse2dense(indices, values) that converts a sparse 2D array in coordinate list format (COO) to a dense 2D array.

here is the indices and the values:

indices = [[0,1], [0,2], [1, 3], [2, 1]] values = [6,1, 5, 3]

python

numpy

2d

sparse-matrix

kernel-density

0 Answers

Your Answer

Accepted video resources