deepmodeling
dpdata
BlogDocsChangelog

Performance History

Latest Results

[pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.13.2 → v0.13.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.2...v0.13.3)
pre-commit-ci-update-config
2 hours ago
fix(qe): use ndmin=2 in np.loadtxt to handle single-line .evp files (#900) When Quantum Espresso cp.x trajectory files contain only a single timestep, the `.evp` energy file has just one data line. This caused `np.loadtxt()` to return a 1D array instead of the expected 2D array, leading to an IndexError when the code attempted 2D indexing operations. ```python # Before: This would fail with single-line .evp files data = np.loadtxt(fname) # Returns 1D array for single line steps = [] for ii in data[begin::step, 0]: # IndexError: too many indices for array steps.append("%d" % ii) # After: Works consistently for both single and multi-line files data = np.loadtxt(fname, ndmin=2) # Always returns at least 2D array steps = [] for ii in data[begin::step, 0]: # Works correctly steps.append("%d" % ii) ``` The fix uses numpy's `ndmin=2` parameter to ensure the loaded data is always at least 2-dimensional, maintaining consistency between single-line and multi-line energy files without requiring additional reshaping logic. **Changes:** - Added `ndmin=2` parameter to `np.loadtxt()` call in `load_energy()` function - Added comprehensive test case to prevent regression **Testing:** - All existing QE tests continue to pass (63 tests) - New test specifically validates single-line `.evp` file handling - CLI functionality verified to work end-to-end Fixes #899. <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
devel
14 days ago

Active Branches

[pre-commit.ci] pre-commit autoupdate
last run
2 hours ago
#904
CodSpeed Performance Gauge
+5%
#886
CodSpeed Performance Gauge
-1%
#870
CodSpeed Performance Gauge
0%
© 2025 CodSpeed Technology
Home Terms Privacy Docs