Moved the float precision casting to the backends
The float32 float64 usage was inconsistent among the code. From this MR on, only the backends should do the casting to the correct floating precision. Additionally, some assertions for correct array usage are put into place. This should replace !148 (closed) .