Create diagonal matrix in python::numpy
Aberta
- Linguagem predominante
- C++
- Estrelas
- 537
- Forks
- 223
- Merge médio
- 11h 22min
- PRs com merge (30d)
- 2
Descrição
This is probably a feature request.
What is the correct way to create diagonal matrix in boost::python::numpy?
Of course, I can just create a usual 2D matrix then assign its diagonal. But is there a better way?
It seems that in numpy (in python), the diagonal matrix is stored in a compact format, e.g. only stores the diagonal data. This can be observed by `a = np.diag(np.random.rand(20000,1))` and watch the memory usage. (much smaller than 20000^2 * 8 / 2^20 MB)
It would be nice to have a method to build diagonal matrix in this "compact" format.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.