docs: fix PyTorch to MLX conversion example (#3265)

This commit is contained in:
Lik Xun Yuan (Lx)
2026-03-16 04:20:12 -07:00
committed by GitHub
parent 0bdbfdb838
commit 1d44d913e6
+1 -4
View File
@@ -90,10 +90,7 @@ PyTorch supports the buffer protocol, but it requires an explicit
a = mx.arange(3)
b = torch.tensor(memoryview(a))
c = mx.array(b.numpy())
Conversion from PyTorch tensors back to arrays must be done via intermediate
NumPy arrays with ``numpy()``.
c = mx.array(b)
JAX
---