-
Notifications
You must be signed in to change notification settings - Fork 47
MLX compatibility: Creation functions #452
Copy link
Copy link
Open
Description
aaishwarymishra
opened on Jul 18, 2026
Issue body actions
| Array API | MLX Analog | Status | Blame / Notes | Test Node | Result |
|---|---|---|---|---|---|
| arange(start, /, stop=None, step=1, *, dtype=None, device=None) | arange(start, stop, step, dtype=None, *, stream=None) | incompatible | MLX rejects valid calls such as arange(0, None, 1). It also lacks device; defaults and positional constraints differ. | test_arange | Failed |
| asarray(obj, /, *, dtype=None, device=None, copy=None) | asarray(a, dtype=None, *, copy=None) | partial | copy=False can fail even when given an MLX array of the requested dtype. MLX also lacks device, and dtype is not keyword-only. | test_asarray_arrays | Failed |
| empty(shape, *, dtype=None, device=None) | empty(shape, dtype=float32, *, stream=None) | undocumented | Implemented by MLX but absent from its documentation. No device; signature/default behavior may differ. | test_empty | Passed |
| empty_like(x, /, *, dtype=None, device=None) | empty_like(a, /, *, stream=None) | undocumented / partial | Implemented but undocumented. It rejects the standard dtype keyword, including dtype=None; no device. Its error refers to zeros_like, suggesting shared or aliased internals. | test_empty_like | Failed |
| eye(n_rows, n_cols=None, /, *, k=0, dtype=None, device=None) | eye(n, m=None, k=0, dtype=float32, *, stream=None) | incompatible | Rejects zero-sized output such as eye(0) and large valid offsets such as k=2147483648. No device; positional constraints also differ. | test_eye | Failed |
| from_dlpack(x, /, *, device=None, copy=None) | from_dlpack(x, /, *, copy=None) | partial | MLX lacks x.device and array_namespace_info().devices(), so the test fails before calling from_dlpack. | test_dlpack.py::test_from_dlpack | Not tested |
| full(shape, fill_value, *, dtype=None, device=None) | full(shape, vals, dtype=None, *, stream=None) | signature mismatch | fill_value is named vals; dtype is not keyword-only; no device. | test_full | Passed |
| full_like(x, /, fill_value, *, dtype=None, device=None) | full_like(a, vals, dtype=None, *, stream=None) | signature mismatch | fill_value is named vals; dtype is not keyword-only; no device. | test_full_like | Passed |
| linspace(start, stop, /, num, *, dtype=None, device=None, endpoint=True) | linspace(start, stop, num=50, dtype=float32, stream=None) | partial | MLX does not support endpoint, causing calls with endpoint=False to fail. It also lacks device; num and dtype constraints differ. | test_linspace | Failed |
| meshgrid(*arrays, indexing="xy") | meshgrid(*arrays, sparse=False, indexing="xy", stream=None) | return mismatch | MLX returns a list; Array API 2025.12 requires a tuple. Extra optional MLX parameters are not themselves incompatible. | test_meshgrid | Failed |
| ones(shape, *, dtype=None, device=None) | ones(shape, dtype=float32, *, stream=None) | signature mismatch | dtype is not keyword-only; no device. Tested behavior otherwise passes. | test_ones | Passed |
| ones_like(x, /, *, dtype=None, device=None) | ones_like(a, /, *, stream=None) | partial | MLX rejects the standard dtype keyword, including dtype=None; it also lacks device. | test_ones_like | Failed |
| tril(x, /, *, k=0) | tril(x, k, *, stream=None) | signature mismatch | MLX accepts k positionally, whereas the Array API makes it keyword-only. Tested behavior passes. | test_tril | Passed |
| triu(x, /, *, k=0) | triu(x, k, *, stream=None) | signature mismatch | MLX accepts k positionally, whereas the Array API makes it keyword-only. Tested behavior passes. | test_triu | Passed |
| zeros(shape, *, dtype=None, device=None) | zeros(shape, dtype=float32, *, stream=None) | signature mismatch | dtype is not keyword-only; no device. Tested behavior otherwise passes. | test_zeros | Passed |
| zeros_like(x, /, *, dtype=None, device=None) | zeros_like(a, /, *, stream=None) | partial | MLX rejects the standard dtype keyword, including dtype=None; it also lacks device. | test_zeros_like | Failed |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
No fields configured for issues without a type.