     return result
 }
 
-public func vstack<StorageType:Storage>(_ tensor1:Tensor<StorageType>, _ tensor2:Tensor<StorageType>)
-    -> Tensor<StorageType>
+public func vstack<StorageType:Storage>(_ tensor1:Tensor<StorageType>, _ tensor2:Tensor<StorageType>) -> Tensor<StorageType>
 {
     return concat(tensor1, tensor2, axis: 0)
 }
 
-public func hstack<StorageType:Storage>(_ tensor1:Tensor<StorageType>, _ tensor2:Tensor<StorageType>)
-    -> Tensor<StorageType>
+public func hstack<StorageType:Storage>(_ tensor1:Tensor<StorageType>, _ tensor2:Tensor<StorageType>) -> Tensor<StorageType>
 {
     return concat(tensor1, tensor2, axis: 1)
 }

    
    init(_ tensor:Tensor, dimIndex:[Int]?=nil, view:StorageView<StorageType>?=nil, stride: [Int]?=nil, copy:Bool=false) {
        if copy {
            storage = StorageType(size: tensor.shape.elements, value: 0)
            for i in 0..<tensor.shape.elements {
                storage[i] = tensor.storage[i]
            }
        } else {
            storage = tensor.storage
        }
        
        internalShape = tensor.internalShape
        offset = 0
        
        if let d = dimIndex {
            self.dimIndex = d
        } else {
            self.dimIndex = tensor.dimIndex
        }
        
        if let v = view {
            self.view = v
        } else {
            if !copy {
                self.view = ViewType(shape: tensor.shape, offset: tensor.view.offset)
            } else {
                // if we're making a copy, then the previously defined offset in the original Tensor
                // is no longer correct
                self.view = ViewType(shape: tensor.shape, offset: Array<Int>(repeating: 0, count: tensor.dims))
            }
        }
        
        if let s = stride {
            self.stride = s
        } else {
            self.stride = tensor.stride
        }
    }
    
    init(tensor:Tensor, shape:Extent, stride:[Int]) {

    return result
}

public func concat<StorageType:Storage>(_ tensors:[Tensor<StorageType>], axis:Int=0) -> Tensor<StorageType>
{
    var result = concat(tensors[0], tensors[1], axis: axis)
    for i in 2..<tensors.count {
