sponge.function.get_energy ============================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindscience/blob/master/MindSPONGE/docs/api/api_python/function/sponge.function.get_energy.rst :alt: 查看源文件 .. py:function:: sponge.function.get_energy(energy: Union[Energy, float], unit: Union[str, Units] = None) 获取特定单位的能量张量。 参数: - **energy** (Union[Energy, float]) - 能量值。 - **unit** (Union[str, Units],可选) - 能量单位。默认值: ``None``。 返回: 特定单位的能量张量。