~ellisonbg/+junk/sparsetools

« back to all changes in this revision

Viewing changes to examples/test.py

  • Committer: Brian E Granger
  • Date: 2008-04-24 20:19:46 UTC
  • Revision ID: ellisonbg@gmail.com-20080424201946-ayjx2w8ib2qbyr5j
Initial import into bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import sparsetools.coo as coo
 
2
 
 
3
 
 
4
a = coo.COOMatrix((5,5),10)
 
5
a[0,0] = 10.0
 
6
a[1,1] = 20.0
 
7
a[1,2] = 30.0
 
8
print a[0,0]
 
9
b = a.todense()
 
10
print b