kopia lustrzana https://github.com/backface/turtlestitch
enhanced 'reshape' to also handle scalars
rodzic
8d5153c1bb
commit
a7ac936578
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue