MCPcopy
hub / github.com/lululxvi/deepxde / random_points

Method random_points

deepxde/geometry/csg.py:138–149  ·  view source on GitHub ↗
(self, n, random="pseudo")

Source from the content-addressed store, hash-verified

136 )
137
138 def random_points(self, n, random="pseudo"):
139 x = np.empty(shape=(n, self.dim), dtype=config.real(np))
140 i = 0
141 while i < n:
142 tmp = self.geom1.random_points(n, random=random)
143 tmp = tmp[~self.geom2.inside(tmp)]
144
145 if len(tmp) > n - i:
146 tmp = tmp[: n - i]
147 x[i : i + len(tmp)] = tmp
148 i += len(tmp)
149 return x
150
151 def random_boundary_points(self, n, random="pseudo"):
152 x = np.empty(shape=(n, self.dim), dtype=config.real(np))

Callers

nothing calls this directly

Calls 2

random_pointsMethod · 0.45
insideMethod · 0.45

Tested by

no test coverage detected