enhanced 'reshape' to also handle scalars

pull/95/head
jmoenig 2021-02-09 10:32:45 +01:00
rodzic 8d5153c1bb
commit a7ac936578
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -15,6 +15,7 @@
* objects: fixed internal migration for "transpose" block
* threads: enhanced MIN and MAX to also operate on text
* threads: enhanced list attributes 'rank', 'shape' and 'ravel' to also handle scalars
* threads: enhanced 'reshape' to also handle scalars
### 2021-02-08
* lists, objects, threads: new RESHAPE primitive

Wyświetl plik

@ -1965,8 +1965,8 @@ Process.prototype.reportCrossproduct = function (lists) {
};
Process.prototype.reportReshape = function (list, shape) {
this.assertType(list, 'list');
this.assertType(shape, 'list');
list = list instanceof List ? list : new List([list]);
return list.reshape(shape);
};