天体物理学 > 天体物理仪器与方法
[提交于 2018年10月3日]
标题:unyt: Handle, manipulate, and convert data with units in Python
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Software that processes real-world data or that models a physical system must have some way of managing units. While simple approaches like the understood convention that all data are in a unit system (such as the MKS SI unit system) do work in practice, they are fraught with possible sources of error both by developers and users of the software. In this paper we present unyt, a Python library based on NumPy and SymPy for handling data that has units. It is designed both to aid quick interactive calculations and to be tightly integrated into a larger Python application or library. We compare unyt with two other Python libraries for handling units, Pint and astropy.units, and find that unyt is faster, has higher test coverage, and has fewer lines of code.
提交历史
来自:Nathan Goldbaum[v1] 2018年10月3日 星期三 00:00:00 UTC