 
 extension Range : TensorIndex {
     public var TensorRange: CountableRange<Int> {
-//        get { return self as! CountableRange<Int> }
         get {
             return (self.lowerBound as! Int)..<(self.upperBound as! Int)
         }

    // convenience variable to access the shape of the view
    open var shape:Extent {
        get { return view.shape }
        set {
            precondition(view.shape.elements == newValue.elements, "Number of elements must match")
            view.shape = newValue

            storage = tensor.storage
        }
        
        self.fixedDims = fixedDims ?? tensor.fixedDims
        
        self.dimIndex = dimIndex ?? tensor.dimIndex
