Question: How to convert array of `Int8` to array of `Float` again revert it.

I have function to filter float data, so i need to first convert it to `[Float]` and process it and again convert it to `[Int8]` and feed it

Answer: 
```
extension Array where Iterator.Element == Int8 {
    var toFloatArray: [Float] {
        return self.map({Float($0)})
    }
}

extension Array where Iterator.Element == Float {
    var toIntArray: [Int8] {
        return self.map({Int8($0)})
    }
}

let myIntArr: [Int8] = [1,2,4]
let myFloatArr: [Float] = myIntArr.toFloatArray
print(myFloatArr)
let newIntArr = myFloatArr.toIntArray
print(newIntArr)

```

Use extensions for clean reusable code.
Ok I Got it thanks @ Martin R 

```
let rr: [Int8] = [ 18, 21, 41, 42, 48, 50, 55, 90]

var float = [Float](repeating: 0, count: rr.count)

vDSP_vflt8(rr, 1, &float, 1, vDSP_Length(rr.count))

var ints = [Int8](repeating: 0, count: rr.count)

vDSP_vfix8(float, 1, &ints, 1, vDSP_Length(float.count))

print(ints)

```