eliphatfs
commited on
Commit
·
ffc566a
1
Parent(s):
50b3aa3
Always random permute.
Browse files
openshape/demo/misc_utils.py
CHANGED
@@ -137,7 +137,7 @@ def input_3d_shape(key=None):
|
|
137 |
if pc.shape[1] == 3:
|
138 |
pc = numpy.concatenate([pc, numpy.ones_like(pc) * 0.4], axis=-1)
|
139 |
prog.progress(0.27, "Normalized Point Cloud")
|
140 |
-
if pc.shape[0]
|
141 |
pc = pc[numpy.random.permutation(len(pc))[:10000]]
|
142 |
elif pc.shape[0] == 0:
|
143 |
raise ValueError("Got empty point cloud!")
|
|
|
137 |
if pc.shape[1] == 3:
|
138 |
pc = numpy.concatenate([pc, numpy.ones_like(pc) * 0.4], axis=-1)
|
139 |
prog.progress(0.27, "Normalized Point Cloud")
|
140 |
+
if pc.shape[0] >= 10000:
|
141 |
pc = pc[numpy.random.permutation(len(pc))[:10000]]
|
142 |
elif pc.shape[0] == 0:
|
143 |
raise ValueError("Got empty point cloud!")
|