Skip to content

Commit 6727485

Browse files
committed
Bug fix: GeometryXTime.uniform_initial_points
1 parent 4ab38b8 commit 6727485

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

deepxde/geometry/timedomain.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ def random_boundary_points(self, n, random="pseudo"):
124124
def uniform_initial_points(self, n):
125125
x = self.geometry.uniform_points(n, True)
126126
t = self.timedomain.t0
127-
return np.hstack((x, np.full([n, 1], t)))
127+
if n != len(x):
128+
print(
129+
"Warning: {} points required, but {} points sampled.".format(n, len(x))
130+
)
131+
return np.hstack((x, np.full([len(x), 1], t)))
128132

129133
def random_initial_points(self, n, random="pseudo"):
130134
x = self.geometry.random_points(n, random=random)

0 commit comments

Comments
 (0)