|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: loading a COO file into Python
Apparently pandas has something for this that outperforms numpy.loadtxt?
http://wesmckinney.com/blog/a-new-hi...ne-for-pandas/ And here: http://akuederle.com/stop-using-numpy-loadtxt |
|
#2
|
||||
|
||||
|
Re: loading a COO file into Python
Thanks Dustin. I'll try that. |
|
#3
|
||||
|
||||
|
Re: loading a COO file into Python
Quote:
Just ran it on a slower machine and it loaded Aijv.dat in less than one second. You are my Python guru Dustin ![]() Last edited by Ether : 10-10-2016 at 15:36. |
|
#4
|
||||
|
||||
|
Re: loading a COO file into Python
Quote:
![]() My guess is that because data isn't already a numpy array, it has to do a lot of work to convert it to one first, and then do the transpose operation. If I'm correct, a second transpose on the result of the first transpose would be very fast, similar to the operation on Ajiv. If I understand what transpose does, it most likely is just moving the pointers to the various axes around -- thus why it's so fast. My understanding of how numpy arrays work is that they try really hard to not actually move data around, but many common operations can be done by just creating/moving various pointers around. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|