NumPy 1.16.2 发行说明#
NumPy 1.16.2 是一个快速发布版本,修复了在 Windows 上遇到的一些问题.支持的 Python 版本为 2.7 和 3.5-3.7.解决的 Windows 问题包括:
Windows 上 NumPy wheels 的 DLL 加载问题,
Windows 上的 distutils 命令行解析.
还有一个回归修复,纠正了 divmod 产生的带符号零,详情请参见下文.
构建此版本的下游开发人员应使用 Cython >= 0.29.2,如果使用 OpenBLAS,则使用 OpenBLAS > v0.3.4.
如果您使用 pip 进行安装,您可能会遇到 pip 未删除的旧版本 NumPy 与当前版本混合的问题,从而导致 ImportError .由于修改后的 pip,该问题在 Debian 派生发行版上尤其常见.解决方法是确保已删除 pip 安装的所有以前的 NumPy 版本.有关此问题的讨论,请参见 #12736 .
兼容性说明#
使用 divmod 时的带符号零#
从 1.12.0 版本开始,当结果为零时,numpy 错误地在使用 divmod 和 floor_divide 函数时返回负号零.例如:
>>> np.zeros(10)//1
array([-0., -0., -0., -0., -0., -0., -0., -0., -0., -0.])
在此版本中,结果正确地返回为正号零:
>>> np.zeros(10)//1
array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
贡献者#
共有 5 人为该版本的发布做出了贡献.名字带有“+”的人是首次贡献补丁.
Charles Harris
Eric Wieser
Matti Picus
Tyler Reddy
Tony LaTorre +
合并的拉取请求#
此版本共合并了 7 个 pull request.
#12909 : TST: fix vmImage dispatch in Azure
#12923 : MAINT: remove complicated test of multiarray import failure mode
#13020 : BUG: fix signed zero behavior in npy_divmod
#13026 : MAINT: Add functions to parse shell-strings in the platform-native…
#13028 : BUG: Fix regression in parsing of F90 and F77 environment variables
#13038 : BUG: parse shell escaping in extra_compile_args and extra_link_args
#13041 : BLD: Windows absolute path DLL loading