Skip to content

Conversation

@Anri-Lombard
Copy link

Summary

  • Fix dtype_from_array_protocol() to handle float64 (size == 8)
  • The 'f' case was missing the float64 handler, causing fall-through to 'c' case

Test plan

Fixes #2958

The dtype_from_array_protocol() function was missing a handler for
float64 (size == 8) in the 'f' case, causing it to fall through to
the 'c' case and return complex64 instead.

Fixes ml-explore#2958
@Anri-Lombard Anri-Lombard force-pushed the fix/load-float64-dtype branch from 2e3e1f1 to b23469f Compare January 4, 2026 04:09
@awni
Copy link
Member

awni commented Jan 4, 2026

Thanks for the contribution. We already have a fix out for that here: https://github.com/ml-explore/mlx/pull/2960/files

@awni awni closed this Jan 4, 2026
@Anri-Lombard Anri-Lombard deleted the fix/load-float64-dtype branch January 4, 2026 18:27
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.

[BUG] mx.load misinterprets dtype as complex64 instead of float64

2 participants