File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -843,13 +843,13 @@ def _load_single_data(
843843 raise RuntimeError (f"{ path } not found!" )
844844
845845 # Create a default array based on requirements
846- if (
847- vv ["atomic" ]
848- and vv [ "type_sel" ] is not None
849- and not vv ["output_natoms_for_type_sel" ]
850- ) :
851- natoms = natoms_sel
852- data = np .full ([natoms , ndof ], vv ["default" ], dtype = dtype )
846+ if vv [ "atomic" ]:
847+ if vv ["type_sel" ] is not None and not vv [ "output_natoms_for_type_sel" ]:
848+ natoms = natoms_sel
849+ data = np . full ([ natoms , ndof ], vv ["default" ], dtype = dtype )
850+ else :
851+ # For non-atomic data, shape should be [ndof]
852+ data = np .full ([ndof ], vv ["default" ], dtype = dtype )
853853 return np .float32 (0.0 ), data
854854
855855 # Branch 2: File exists, use memmap
You can’t perform that action at this time.
0 commit comments