mirror of
https://github.com/ml-explore/mlx.git
synced 2025-10-20 17:38:09 +08:00
fix build w/ flatten (#195)
This commit is contained in:
@@ -73,6 +73,12 @@ TEST_CASE("test flatten") {
|
||||
// Check start > end throws
|
||||
CHECK_THROWS(flatten(x, 2, 1));
|
||||
|
||||
// Check start >= ndim throws
|
||||
CHECK_THROWS(flatten(x, 5, 6));
|
||||
|
||||
// Check end < 0 throws
|
||||
CHECK_THROWS(flatten(x, -5, -4));
|
||||
|
||||
// Check scalar flattens to 1D
|
||||
x = array(1);
|
||||
CHECK_EQ(flatten(x, -3, -1).shape(), std::vector<int>({1}));
|
||||
|
Reference in New Issue
Block a user