Skip to content

Instantly share code, notes, and snippets.

@elsonidoq
Created September 8, 2012 17:06
Show Gist options
  • Save elsonidoq/3677257 to your computer and use it in GitHub Desktop.
Save elsonidoq/3677257 to your computer and use it in GitHub Desktop.
La matriz más grande que no da MemoryError
from scipy import *
min=10000; max=min*100
s= (min+max)/2
while True:
if max - min < 2: break
avg= (min+max)/2
try:
m=zeros((s,s))
del m
min= avg
except MemoryError:
max=avg
s=avg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment