View Single Post
  #12   Spotlight this post!  
Unread 07-10-2016, 15:17
vScourge's Avatar
vScourge vScourge is offline
Videogame Developer
AKA: Adam Pletcher
FRC #4096 (Ctrl-Z)
Team Role: Coach
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Champaign, IL
Posts: 31
vScourge is on a distinguished road
Re: loading a COO file into Python

This only took 3.4 seconds to run on my Win 8.1 system.

Code:
import os
import time

time_start = time.time( )

data = [ ]

for line in open( r'D:\temp\Aijv.dat', 'r' ):
	data.append( [ int( x ) for x in line.rstrip( ).split( ' ' ) ] )

print( '{0:.2f} secs'.format( time.time( ) - time_start ) )
Reply With Quote