Skip to content

Instantly share code, notes, and snippets.

@psinger
Created August 27, 2014 14:56
Show Gist options
  • Save psinger/c5d838433add35df6a74 to your computer and use it in GitHub Desktop.
Save psinger/c5d838433add35df6a74 to your computer and use it in GitHub Desktop.
reference confusion
def change(a):
a[0,0] = 5
a = a / a.sum()
a[0,0] = 7
print a
a = csr_matrix((2,2))
a[0,0] = 2
a[1,1] = 2
print a
print
change(a)
print
print a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment