You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem block_avg() assumes at least one full block survives after skip. If the input after skipping is empty, data_chunks[-1] raises IndexError; if it has fewer samples than block_size, the only partial block is dropped and NumPy later raises an axis error.
Expected result
The function should either handle the partial block intentionally or raise a clear validation error explaining that no complete block is available.
Source: Codex global repository scan of deepmodeling/dpti at commit b719828.
Project: DeepModeling Agent Code Scan
Problem
block_avg()assumes at least one full block survives afterskip. If the input after skipping is empty,data_chunks[-1]raisesIndexError; if it has fewer samples thanblock_size, the only partial block is dropped and NumPy later raises an axis error.Code references
dpti/dpti/lib/utils.py
Line 105 in b719828
dpti/dpti/lib/utils.py
Line 112 in b719828
dpti/dpti/lib/utils.py
Line 120 in b719828
Reproduction
Run:
Expected result
The function should either handle the partial block intentionally or raise a clear validation error explaining that no complete block is available.