Skip to content

Latest commit

 

History

History
199 lines (163 loc) · 12.3 KB

CHANGELOG.md

File metadata and controls

199 lines (163 loc) · 12.3 KB

Changelog

Specification changelog.

This changelog is organized by specification version and notes all changes with respect to the previous version. Within the section for a specific version (e.g., v2022.12), separate sections are used for (a) changes to existing APIs and requirements, (b) new APIs and new requirements, and (c) errata.

v2022.12

Updates

Updates to existing APIs and requirements.

APIs

  • __bool__: add support for non-boolean data types (gh-497)
  • __dlpack__: raise BufferError when data cannot be exported as DLPack (gh-498)
  • __float__: add support for non-floating-point data types (gh-497)
  • __int__: add support for non-integer data types (gh-497)
Complex Number Support

The following APIs were updated to support arrays having complex floating-point data types:

Extensions

Updates to APIs and requirements included as part of specification extensions.

  • Mechanism by which to access extension APIs (gh-470)
  • linalg.cross: add support for broadcasting (gh-417)
  • linalg.trace: add support for specifying output array data type (gh-502)
Complex Number Support

The following APIs were updated to support arrays having complex floating-point data types:


Additions

New APIs and requirements added to the specification.

Data Types

The following data types were added to the specification:

  • complex64: single-precision complex floating-point numbers (gh-418)
  • complex128: double-precision complex floating-point numbers (gh-418)

To support complex floating-point numbers, the following requirements were added to the specification:

  • Type promotion rules: real-complex and complex-complex data type promotion guidance (gh-491)
  • Guidance for mixing arrays and Python complex scalars (gh-513)
  • Guidance for data type variability across devices (gh-515)
  • Guidance for complex number ordering (gh-527)
  • Guidance for complex number equality (gh-528)
  • Guidance for value-based promotion when results are outside of their real domain (gh-573)

note: conforming implementations must define a default complex floating-point data type.

APIs

The following APIs were added to the specification:

  • __array_api_version__: string representing the version of the array API specification (gh-480)
  • __complex__: convert a zero-dimensional array to a Python complex object (gh-497)
  • conj: return the complex conjugate of a complex number (gh-446)
  • finfo.dtype: floating-point data type (gh-485)
  • iinfo.dtype: integer data type (gh-485)
  • imag: return the imaginary component of a complex number (gh-496)
  • isdtype: test whether a provided dtype is of a specified data type kind (gh-503)
  • real: return the real component of a complex number (gh-427)
  • take: return elements of an array along a specified axis (gh-416)

Extensions

The following optional extensions were added to the specification:

  • fft: Fast Fourier Transforms (FFT) (gh-189)

    • fft
    • ifft
    • fftn
    • ifftn
    • rfft
    • rfftn
    • irfft
    • irfttn
    • fftfreq
    • rfftfreq
    • fftshift
    • ifftshift

Errata

The following is a list of fixes and points of clarification with regard to the previous version of the specification:

  • Missing self parameter for array object properties (gh-464)
  • __setitem__: clarify that in-place element-wise operations must not change the shape of the in-place array as a result of broadcasting (gh-429)
  • full: missing type annotation for bool fill values (gh-435)
  • full_like: missing type annotation for bool fill values (gh-435)
  • iinfo: fix typo in description (gh-439)
  • linalg.eigh: fix input data type to allow non-floating-point data types for backward compat in alignment with other linalg APIs (gh-572)
  • linalg.eigvalsh: fix input data type to allow non-floating-point data types for backward compat in alignment with other linalg APIs (gh-572)
  • linalg.matrix_rank: fix return data type (gh-510)
  • linalg.trace: clarify special cases for floating-point operands and the empty sum (gh-502)
  • linspace: conversion of start and stop should follow type promotion rules (gh-568)
  • nonzero: clarify that, for arrays having a boolean data type, non-zero elements are those elements which equal True (gh-441)
  • trunc: fix description (gh-511)
  • vecdot: clarify broadcasting behavior (gh-417 and gh-473)