File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ def __init__(self, num_sample):
8989 def __getitem__ (self , index ):
9090 x = np .linspace (0 , 0.9 , 10 )
9191 y = np .linspace (0 , 0.9 , 10 )
92+ np .random .seed (index ) # Optional: Ensure reproducibility
9293 bc_value = np .random .rand (36 ).reshape (36 , 1 ).astype ('float32' )
9394
9495 domain_space = []
@@ -100,8 +101,9 @@ def __getitem__(self, index):
100101 bc_index .append (i + 10 * j )
101102 domain_space = np .array (domain_space , dtype = 'float32' )
102103 bc_index = np .array (bc_index , dtype = 'int64' )
103-
104- return domain_space , bc_index , bc_value
104+ # Return a single input point and its related information based on the index
105+ idx = index % len (domain_space )
106+ return domain_space [idx ], bc_index , bc_value
105107
106108 def __len__ (self ):
107109 return self .num_sample
You can’t perform that action at this time.
0 commit comments