| 15 | }; |
| 16 | |
| 17 | int check_shape_dim(int64_t dim) { |
| 18 | if (dim > std::numeric_limits<int>::max()) { |
| 19 | throw std::invalid_argument( |
| 20 | "Shape dimension falls outside supported `int` range."); |
| 21 | } |
| 22 | return static_cast<int>(dim); |
| 23 | } |
| 24 | |
| 25 | template <typename T> |
| 26 | mx::array nd_array_to_mlx_contiguous( |
no test coverage detected