Search found 2 matches

by F0043C0
3 years ago
Forum: API
Topic: Matrix to GDX from Python
Replies: 3
Views: 5725

Re: Matrix to GDX from Python

Thank you so much!
Would there be a faster/more efficient way to do this if I were using a csr_matrix or any other type of sparse matrix?
by F0043C0
3 years ago
Forum: API
Topic: Matrix to GDX from Python
Replies: 3
Views: 5725

Matrix to GDX from Python

The Python API tutotial on the GAMS website mentions how to convert a dictionary into a GAMS parameter struct. If I have a python matrix like the one below: A= [[0., 0., 0., 0., 0.], [0., 0., 0., 0., 0.], [0., 0., 0., 0., 0.], [0., 0., 0., 1., 0.], [0., 0., 0., 0., 1.]] What is the simplest way to a...