     open func resize(_ newShape:Extent) {
         if shape != newShape {
             storage = StorageType(size: newShape.elements, value: 0)
-            internalShape = newShape
             self.stride = calculateStride(Extent(storage.calculateOrder(newShape.dims)))
             dimIndex = storage.calculateOrder(newShape.count)
             

    
    init(storage:StorageType, shape:Extent, view:StorageView<StorageType>?=nil) { //, offset:Int?=nil) {
        self.storage = storage
        internalShape = shape
        self.stride = calculateStride(Extent(storage.calculateOrder(shape.dims)))
        dimIndex = storage.calculateOrder(shape.count)
        self.view = view ?? ViewType(shape: shape, offset: Array<Int>(repeating: 0, count: shape.count))

    
    init(tensor:Tensor, shape:Extent, stride:[Int]) {
        storage = tensor.storage
        self.stride = stride
        
        // check if we need to increase the size of tensor.view.offset
