(contained_type, values)
| 12238 | return n; |
| 12239 | } |
| 12240 | createList(contained_type, values) { |
| 12241 | const n = this.create('prim::ListConstruct', values); |
| 12242 | for (const v of values) { |
| 12243 | if (!v.type().isSubtypeOf(contained_type)) { |
| 12244 | throw new python.Error('Invalid list item.'); |
| 12245 | } |
| 12246 | } |
| 12247 | n.output().setType(torch.ListType.create(contained_type)); |
| 12248 | return n; |
| 12249 | } |
| 12250 | createListUnpack(v, size) { |
| 12251 | const list_type = v.type().expect(torch.ListType); |
| 12252 | const elem_type = list_type.getElementType(); |
no test coverage detected