mlx/python/tests
AmirHossein_Razlighi f48bc496c7
Comparing python objects (such as list/tuple) with mlx.core.array (#920)
* add implicit conversion of list to array for equality constraint

* add tests for array equality

* add test for tuple and array equality

* return False if __eq__ arg is list or tuple

* write tests for equality

* update the rule of comparison for __ge__/__gt__/__lt__/__le__

* add a helper function for detecting mlx.core.array

* return true in case fo inequality

* debug minor issue regarding detecting mlx array

* add tests for inequality comparisons

* add name for contribution

* reformat files using pre-commit

* update tests for float

* update tests for inequality

* raise exception in case of invalid comparisons

* use isinstance instead of string comparison

* replace "is_convirtable_to_array" with previous logic

* remove throwing exceptions for other operations

* just a comment

* minor changes for efficiency

* optimize a utils function

* change the function name

* Update ACKNOWLEDGMENTS.md

---------

Co-authored-by: Awni Hannun <awni.hannun@gmail.com>
2024-03-29 06:52:30 -07:00
..
mlx_tests.py Make MLX build on x64 macOS (#901) 2024-03-27 06:14:29 -07:00
test_array.py Comparing python objects (such as list/tuple) with mlx.core.array (#920) 2024-03-29 06:52:30 -07:00
test_autograd.py Fix logsumexp edge case (#740) 2024-02-25 08:39:55 -08:00
test_bf16.py bump pre commit and fix format (#373) 2024-01-04 16:28:52 -08:00
test_blas.py No copy gems (#801) 2024-03-12 13:13:41 -07:00
test_compile.py NumberOfElements for shapeless compile and vmap fixes (#802) 2024-03-13 10:34:14 -07:00
test_constants.py feat: Add numpy constants (#428) 2024-01-11 06:47:29 -08:00
test_conv.py Convolution update (#651) 2024-02-28 20:11:16 -08:00
test_device.py Adds device context manager (#679) 2024-02-14 14:14:58 -08:00
test_eval.py Compile with capture (#629) 2024-02-07 17:29:22 -08:00
test_fast_sdpa.py Make MLX build on x64 macOS (#901) 2024-03-27 06:14:29 -07:00
test_fast.py Implement vjps for some primitives in the fast namespace (#883) 2024-03-26 16:35:34 -07:00
test_fft.py Adds device context manager (#679) 2024-02-14 14:14:58 -08:00
test_graph.py Multi output primitives (#330) 2024-01-08 16:39:08 -08:00
test_init.py Make shape a tuple (#591) 2024-01-30 13:11:01 -08:00
test_linalg.py Add matrix inversion primitive (#822) 2024-03-15 06:34:36 -07:00
test_load.py Fix logsumexp edge case (#740) 2024-02-25 08:39:55 -08:00
test_losses.py Feat: Add weights argument in BCE Loss and tests (#620) 2024-02-07 09:39:52 -08:00
test_metal.py bindings for memory info (#761) 2024-03-01 19:51:58 -08:00
test_nn.py Support Chaining for some of functionalities of nn.Module (#885) (#897) 2024-03-27 19:58:29 -07:00
test_ops.py Make MLX build on x64 macOS (#901) 2024-03-27 06:14:29 -07:00
test_optimizers.py Add minimum for cosine decay function (#859) 2024-03-21 07:33:29 -07:00
test_quantized.py Fix qmm_t for unaligned cases (#923) 2024-03-28 15:34:57 -07:00
test_random.py Fixing random.normal for half-precision dtype #642 (#904) 2024-03-26 09:58:27 -07:00
test_reduce.py Add GPU support for uint64/int64 reductions (#569) 2024-01-31 11:18:04 -08:00
test_tree.py Add isort pre-commit and run (#68) 2023-12-08 11:31:47 -08:00
test_vmap.py Add vmap for SVD and inverse (#849) 2024-03-21 13:18:27 -07:00