         guard self.shape.contiguousSize == newShape.contiguousSize else {
             return nil
         }
-        return Tensor(shape: newShape, items: items)
+        return Tensor(shape: newShape, items: _items)
     }
     
 }


    func withUnsafeBufferPointer<Result>
        (_ body: (UnsafeBufferPointer<ItemType>) throws -> Result) rethrows -> Result {
        return try items.withUnsafeBufferPointer { ptr in
            try body(ptr)
        }
    }

    mutating func withUnsafeMutableBufferPointer<Result>
        (_ body: (inout UnsafeMutableBufferPointer<ItemType>) throws -> Result) rethrows -> Result {
        return try items.withUnsafeMutableBufferPointer { ptr in
            try body(&ptr)
        }
    }

                     "Item count does not match element shape")
        self.itemCountPerElement = elementShape == nil ? 0 : elementContiguousSize
        self.elementShape = elementShape
        self._items = items
    }

    /// Initialize a tensor using an existing slice of elements in row-major order
