             self[{IndexPath({ranges.map { $0.tensorRange }}())}()] = newValue
         }
     }
-
+}
+
+public extension Tensor where Scalar: TensorFlowFloatingPoint {
     @usableFromInline
     internal func _vjpSubscript(
         _ indexPath: IndexPath

    /// - Parameter lowerBounds: The lower bounds at each dimension.
    /// - Parameter upperBounds: The upper bounds at each dimension.
    @inlinable
    @differentiable(wrt: self)
    func slice(lowerBounds: [Int], upperBounds: [Int]) -> Tensor {
        // TODO: Precondition `lowerBounds.count == upperBounds.count`,
        // preferably in graph.

    }

    @inlinable
    @differentiable(wrt: self, vjp: _vjpSubscript where Scalar : TensorFlowFloatingPoint)
    internal subscript(_ indexPath: IndexPath) -> Tensor {
        get {
            return Raw.stridedSlice(
