mirror of
				https://github.com/ml-explore/mlx.git
				synced 2025-10-31 16:21:27 +08:00 
			
		
		
		
	 dfdb284e16
			
		
	
	dfdb284e16
	
	
	
		
			
			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