Menu

[r7966]: / branches / mathtex / unit / inside_poly_memleak.py  Maximize  Restore  History

Download this file

29 lines (21 with data), 600 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
"""
Another broken test...
"""
import os, sys, time
import matplotlib.nxutils as nxutils
from numpy.random import rand
def report_memory(i):
pid = os.getpid()
a2 = os.popen('ps -p %d -o rss,sz' % pid).readlines()
print i, ' ', a2[1],
return int(a2[1].split()[1])
for i in range(500):
report_memory(i)
verts = rand(100, 2)
b = nxutils.pnpoly(x, y, verts) # x, y don't exist
for i in range(500):
report_memory(i)
verts = rand(100, 2)
points = rand(10000,2)
mask = nxutils.points_inside_poly(points, verts)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.