(loc, sliceable, subscript_exprs)
| 17946 | return this.emitSliceOp(loc, input, dim, start, end, step); |
| 17947 | } |
| 17948 | emitBasicSlice(loc, sliceable, subscript_exprs) { |
| 17949 | torch._C.AT_ASSERT(subscript_exprs instanceof ast.Slice); |
| 17950 | const slice_exp = subscript_exprs; |
| 17951 | let maybe_dim = null; |
| 17952 | if (sliceable.type().isSubtypeOf(torch.TensorType.get())) { |
| 17953 | maybe_dim = this.graph.insertConstant(0, loc); |
| 17954 | } |
| 17955 | return this.emitSlice(loc, sliceable, maybe_dim, slice_exp); |
| 17956 | } |
| 17957 | emitSubscript(subscript, type_hint) { |
| 17958 | type_hint = type_hint === undefined ? null : type_hint; |
| 17959 | const sv = this.emitSugaredExpr(subscript.value, 1); |
no test coverage detected