Skip to content

Align complex64 finfo with NumPy#1

Closed
ronaldmannak wants to merge 1 commit into
mainfrom
complex64
Closed

Align complex64 finfo with NumPy#1
ronaldmannak wants to merge 1 commit into
mainfrom
complex64

Conversation

@ronaldmannak

Copy link
Copy Markdown

Proposed changes

complex64 is a single-precision complex type with float32 components, so numpy.finfo(numpy.complex64) returns float32 limits. In the Swift FInfo implementation, .complex64 was grouped with .float64, which surfaced double-precision values

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the DType enum in Source/MLX/DType.swift to group the .complex64 case with .float32 instead of .float64 when determining floating-point properties such as ulpOfOne, greatestFiniteMagnitude, leastNormalMagnitude, and leastNonzeroMagnitude. This correctly reflects that a 64-bit complex number is composed of two 32-bit float components. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant