mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Allow non-square lu (#1889)
This commit is contained in:
@@ -59,10 +59,14 @@ void lu_factor_impl(
|
||||
}
|
||||
|
||||
// Subtract 1 to get 0-based index
|
||||
for (int j = 0; j < pivots.shape(-1); ++j) {
|
||||
int j = 0;
|
||||
for (; j < pivots.shape(-1); ++j) {
|
||||
pivots_ptr[j]--;
|
||||
row_indices_ptr[j] = j;
|
||||
}
|
||||
for (; j < row_indices.shape(-1); ++j) {
|
||||
row_indices_ptr[j] = j;
|
||||
}
|
||||
for (int j = pivots.shape(-1) - 1; j >= 0; --j) {
|
||||
auto piv = pivots_ptr[j];
|
||||
auto t1 = row_indices_ptr[piv];
|
||||
|
||||
Reference in New Issue
Block a user