deepmodeling / dpdata

Manipulating multiple atomic simulation data formats, including DeePMD-kit, VASP, LAMMPS, ABACUS, etc.
https://docs.deepmodeling.com/projects/dpdata/
GNU Lesser General Public License v3.0
191 stars 128 forks source link

support `-1` shape in DataType #510

Closed njzjz closed 12 months ago

njzjz commented 12 months ago

Sometimes, the shape is unknown and can be any integer. This PR supports this situation. The shape of a dimension can be -1. Note: Only one -1 can be used.

codecov[bot] commented 12 months ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% :tada:

Comparison is base (9ef8daf) 82.75% compared to head (d92ed20) 82.77%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## devel #510 +/- ## ========================================== + Coverage 82.75% 82.77% +0.01% ========================================== Files 71 71 Lines 6421 6428 +7 ========================================== + Hits 5314 5321 +7 Misses 1107 1107 ``` | [Files Changed](https://app.codecov.io/gh/deepmodeling/dpdata/pull/510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepmodeling) | Coverage Δ | | |---|---|---| | [dpdata/data\_type.py](https://app.codecov.io/gh/deepmodeling/dpdata/pull/510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepmodeling#diff-ZHBkYXRhL2RhdGFfdHlwZS5weQ==) | `89.23% <100.00%> (+0.89%)` | :arrow_up: | | [dpdata/deepmd/comp.py](https://app.codecov.io/gh/deepmodeling/dpdata/pull/510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepmodeling#diff-ZHBkYXRhL2RlZXBtZC9jb21wLnB5) | `94.92% <100.00%> (+0.03%)` | :arrow_up: | | [dpdata/deepmd/raw.py](https://app.codecov.io/gh/deepmodeling/dpdata/pull/510?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepmodeling#diff-ZHBkYXRhL2RlZXBtZC9yYXcucHk=) | `91.57% <100.00%> (+0.08%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.