Skip to content
Snippets Groups Projects
Commit 8ad6f891 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

allowed transpose to take ({})

Rev: lib/modules/Array.pmod:1.15
parent 5bfae846
No related branches found
No related tags found
No related merge requests found
...@@ -182,9 +182,10 @@ array columns(array x, array ind) ...@@ -182,9 +182,10 @@ array columns(array x, array ind)
array transpose(array x) array transpose(array x)
{ {
array ret=allocate(sizeof(x[0])); if (!sizeof(x)) return x;
for(int e=0;e<sizeof(x[0]);e++) ret[e]=column(x,e); array ret=allocate(sizeof(x[0]));
return ret; for(int e=0;e<sizeof(x[0]);e++) ret[e]=column(x,e);
return ret;
} }
// diff3, complement to diff (alpha stage) // diff3, complement to diff (alpha stage)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment