| # | Line 466 | Line 466 | rmx_transpose(const RMATRIX *rm) | |
|---|---|---|
| 466 | ||
| 467 | if (rm == NULL) | |
| 468 | return(0); | |
| 469 | + | if ((rm->nrows == 1) | (rm->ncols == 1)) { |
| 470 | + | dnew = rmx_copy(rm); |
| 471 | + | dnew->nrows = rm->ncols; |
| 472 | + | dnew->ncols = rm->nrows; |
| 473 | + | return(dnew); |
| 474 | + | } |
| 475 | dnew = rmx_alloc(rm->ncols, rm->nrows, rm->ncomp); | |
| 476 | if (dnew == NULL) | |
| 477 | return(NULL); | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines (old) |
| > | Changed lines (new) |