mlx icon indicating copy to clipboard operation
mlx copied to clipboard

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

Open krishi-saripalli opened this issue 11 months ago • 2 comments

Describe the bug mx.load() appears to misinterpret the datatype of .npy files with 64-bit data as complex64 when it should be float64.

To Reproduce

Include code snippet

>>> import numpy as np
>>> import mlx.core as mx
>>> data = np.load("my_data.npy")
>>> print(f"Dtype: {data.dtype}")
Dtype: float64
>>> mx_data = mx.load("my_data.npy")
>>> print(f"Dtype: {mx_data.dtype}")
Dtype: mlx.core.complex64
>>> 

Expected behavior Like numpy, the data should be correctly loaded as float64

Desktop (please complete the following information):

  • OS Version: MacOS 15.6
  • Version 0.30.1

Additional context Add any other context about the problem here.

krishi-saripalli avatar Dec 28 '25 00:12 krishi-saripalli

Can you provide a copy of my_data.npy to make it easier to reproduce?

MillaFleurs avatar Jan 05 '26 01:01 MillaFleurs

This is already fixed in #2960

awni avatar Jan 05 '26 14:01 awni