Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 167fbff commit 2025ce4Copy full SHA for 2025ce4
1 file changed
unit/inside_poly_memleak.py
@@ -0,0 +1,25 @@
1
+#!/usr/bin/env python
2
+
3
+import os, sys, time
4
+import matplotlib.nxutils as nxutils
5
+import matplotlib.numerix as nx
6
7
+def report_memory(i):
8
+ pid = os.getpid()
9
+ a2 = os.popen('ps -p %d -o rss,sz' % pid).readlines()
10
+ print i, ' ', a2[1],
11
+ return int(a2[1].split()[1])
12
13
14
15
+for i in range(500):
16
+ report_memory(i)
17
+ verts = nx.mlab.rand(100, 2)
18
+ b = nxutils.pnpoly(x, y, verts)
19
20
+ for i in range(500):
21
22
23
+ points = nx.mlab.rand(10000,2)
24
+ mask = nxutils.points_inside_poly(points, verts)
25
0 commit comments