Quote:
Originally Posted by Ether
Attached ZIP file contains a 17842x2696 matrix with 53526 non-zero elements stored in Octave sparse format.
Can Python load a matrix stored in this format?
|
Octave loads the file in less than half a second, and converts it to full format in about a third of a second:
Code:
GNU Octave, version 3.6.4
Copyright (C) 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
Octave was configured for "i686-pc-mingw32".
Additional information about Octave is available at http://www.octave.org.
+ ## load the alliances design matrix
+ tic;
+ load ('$A.dat');
+ toc
Elapsed time is 0.422 seconds.
+ [alliances, teams] = size (A)
alliances = 17842
teams = 2696
+ matches = alliances / 2
matches = 8921
+ ## convert it to full
+ tic;
+ Af = full (A);
+ toc
Elapsed time is 0.343 seconds.
+ endscript;