NumPy 2.0:一个进化的里程碑

  • Summary: NumPy 1.0 was released 18 years ago and now NumPy 2.0 is launched. It marks a significant milestone with various enhancements and improvements. The long journey to 2.0 involved breaking backward compatibility to implement significant changes in the type system. Key highlights include a cleaned-up Python API, improved scalar promotion rules, a new DType API and string dtype, Windows compatibility enhancements, and support for the Python array API standard. Users need to adjust existing code and a migration guide is provided. C API users need to recompile projects. The release was collaborative and involved contributions from a diverse community with support from funders. Future improvements are expected based on 2.0 changes.
  • Main points:

    • NumPy 2.0 is a major release after 18 years.
    • It breaks backward compatibility for type system improvements.
    • Key highlights: Python API cleanup, scalar promotion update, new DType API, Windows compatibility, and array API support.
    • Users need to adjust code and a migration guide is available.
    • C API users need to recompile.
    • The release was collaborative with support from funders.
  • Key details:

    • Python API namespace reduced by 10% and numpy.lib namespace by 80%.
    • Scalar promotion rules updated as per NEP 50.
    • New DType API and StringDType implemented as per NEP 41 and NEP 55.
    • Default 32-bit integer on Windows updated to 64-bit on 64-bit architectures.
    • Build process simplified for backward compatibility.
    • Comprehensive migration guide and ruff plugin provided.
    • NumPy 2.0 roadmap includes features in the pipeline.
阅读 34
0 条评论