mlx/python/tests
Daniel Strobusch dfdb284e16
make behaviour of dtype arguments consistent and compliant to numpy (#379)
All functions that take an optional dtype should

* have a default dtype visible in the generated docs (accomplished via `"dtype"_a = std::optional{float32}`)
* behave identical when `dtype=None` or no dtype is passed

This important when passing kw args down from a numpy function like:

```
def f(x, dtype=None):
  mx.random.uniform(dtype=dtype)
  # ...
```

NumPy functions behave like this.

It also fixes a minor bug in `tri`: #378

Closes #378
2024-01-05 09:37:46 -08:00
..
mlx_tests.py Fix CI (#359) 2024-01-04 06:33:08 -08:00
test_array.py support python mlx.array creation from list of mlx.array's (#325) 2024-01-04 18:53:33 -08:00
test_autograd.py Add isort pre-commit and run (#68) 2023-12-08 11:31:47 -08:00
test_bf16.py bump pre commit and fix format (#373) 2024-01-04 16:28:52 -08:00
test_blas.py bump pre commit and fix format (#373) 2024-01-04 16:28:52 -08:00
test_conv.py Add isort pre-commit and run (#68) 2023-12-08 11:31:47 -08:00
test_device.py Add isort pre-commit and run (#68) 2023-12-08 11:31:47 -08:00
test_eval.py Add isort pre-commit and run (#68) 2023-12-08 11:31:47 -08:00
test_fft.py Add isort pre-commit and run (#68) 2023-12-08 11:31:47 -08:00
test_linalg.py linalg.norm (#187) 2023-12-26 19:42:04 -08:00
test_load.py bump pre commit and fix format (#373) 2024-01-04 16:28:52 -08:00
test_losses.py Module checks the weight on load_weights (#337) 2024-01-02 18:55:42 -08:00
test_nn.py Fix the sigmoid module (#371) 2024-01-04 13:16:36 -08:00
test_ops.py make behaviour of dtype arguments consistent and compliant to numpy (#379) 2024-01-05 09:37:46 -08:00
test_optimizers.py Pr template (#99) 2023-12-09 09:36:56 -08:00
test_quantized.py Support for quantized matmul with w and w^T (#349) 2024-01-03 14:22:36 -08:00
test_random.py make behaviour of dtype arguments consistent and compliant to numpy (#379) 2024-01-05 09:37:46 -08:00
test_reduce.py bump pre commit and fix format (#373) 2024-01-04 16:28:52 -08:00
test_tree.py Add isort pre-commit and run (#68) 2023-12-08 11:31:47 -08:00
test_vmap.py Add move and swap axis, and vmap for slice, concat, and gather (#158) 2023-12-14 12:59:12 -08:00