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

            storage = tensor.storage
        }
        
        internalShape = tensor.internalShape
        self.view = view ?? ViewType(shape: tensor.shape, offset: copy ? tensor.view.offset : Array<Int>(repeating: 0, count: tensor.dims))
        self.dimIndex = dimIndex ?? tensor.dimIndex
        self.stride = stride ?? tensor.stride

    
    init(storage:StorageType, shape:Extent, view:StorageView<StorageType>?=nil) { //, offset:Int?=nil) {
        self.storage = storage
        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))
