Repository: pyccel/pyccel (language: python)

Issue:
Can't copy array and change type in C
### Describe the bug
It is possible to create an array from another. This functions as a copy operator. This works well for objects of the same type but it fails in a C translation when the type is different

### To Reproduce
Provide code to reproduce the behavior:
```python
import numpy as np

def create_float_copy(a : 'int[:,:]'):
    c = np.array(a, dtype=float)
    return c

if __name__ == '__main__':
    arr = np.ones((3,4), dtype=int)
    print(arr)
    arr2 = create_float_copy(arr)
    print(arr2)
```

### Error details
The output of the C translation is:
```
[[1 1 1 1]
[1 1 1 1]
[1 1 1 1]]
[[0.000000000000 0.000000000000 0.000000000000 0.000000000000]
[0.000000000000 0.000000000000 0.000000000000 0.000000000000]
[0.000000000000 0.000000000000 0.000000000000 0.000000000000]]
```

### Expected behavior
The output of the Python code is:
```
[[1 1 1 1]
 [1 1 1 1]
 [1 1 1 1]]
[[1. 1. 1. 1.]
 [1. 1. 1. 1.]
 [1. 1. 1. 1.]]
```

### Language
C

### Additional context
This occurs due to the implementation of `array_copy_data` here:
https://github.com/pyccel/pyccel/blob/6e6f088edc909ae339d52a5b46b0c2f0553be0d9/pyccel/stdlib/ndarrays/ndarrays.c#L491-L510
It uses `memcpy` which is very efficient for objects of the same datatype but leads to the wrong result in this case


Discussion / hints:
Hi @EmilyBourne, if you are ok, can I work on this bug? I have the idea what is wrong here and I can provide an implementation. 
Hi, thanks for your help :). The issue is free. I have assigned it to you. Feel free to get in touch on discord if you need any help setting up your environment or help with the issue itself
Thanks @EmilyBourne.

Fix patch:
diff --git a/AUTHORS b/AUTHORS
index 8416d06035..6c30ce5830 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -30,3 +30,4 @@ Contributors
 * Priyabrata Mondal
 * Farouk Ech-Charef
 * Mustapha Belbiad
+* Varadarajan Rengaraj
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7ff643bf5a..ca20a6ae09 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
 ### Fixed
 
 -   #1720 : Fix Undefined Variable error when the function definition is after the variable declaration.
+-   #1762 : Fix array copy between different data types.
 -   #1763 Use `np.result_type` to avoid mistakes in non-trivial NumPy type promotion rules.
 -   Fix some cases where a Python built-in type is returned in place of a NumPy type.
 -   Stop printing numbers with more decimal digits than their precision.
diff --git a/pyccel/stdlib/ndarrays/ndarrays.c b/pyccel/stdlib/ndarrays/ndarrays.c
index 98e9990132..f3884f9d87 100644
--- a/pyccel/stdlib/ndarrays/ndarrays.c
+++ b/pyccel/stdlib/ndarrays/ndarrays.c
@@ -490,6 +490,175 @@ bool is_same_shape(t_ndarray a, t_ndarray b)
     return (true);
 }
 
+#define COPY_DATA_FROM_(SRC_TYPE) \
+    void copy_data_from_##SRC_TYPE(t_ndarray **ds, t_ndarray src, uint32_t offset, bool elem_wise_cp) \
+    { \
+        t_ndarray *dest = *ds; \
+        switch(dest->type) \
+        { \
+            case nd_bool: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_bool[i + offset] = (bool)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_bool[element_index(*dest, i, dest->nd) + offset] = (bool)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+            case nd_int8: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_int8[i + offset] = (int8_t)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_int8[element_index(*dest, i, dest->nd) + offset] = (int8_t)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+            case nd_int16: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_int16[i + offset] = (int16_t)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_int16[element_index(*dest, i, dest->nd) + offset] = (int16_t)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+            case nd_int32: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_int32[i + offset] = (int32_t)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_int32[element_index(*dest, i, dest->nd) + offset] = (int32_t)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+            case nd_int64: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_int64[i + offset] = (int64_t)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_int64[element_index(*dest, i, dest->nd) + offset] = (int64_t)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+            case nd_float: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_float[i + offset] = (float)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_float[element_index(*dest, i, dest->nd) + offset] = (float)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+            case nd_double: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_double[i + offset] = (double)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_double[element_index(*dest, i, dest->nd) + offset] = (double)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+            case nd_cfloat: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_cfloat[i + offset] = (float complex)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_cfloat[element_index(*dest, i, dest->nd) + offset] = (float complex)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+            case nd_cdouble: \
+                if(elem_wise_cp == false)\
+                { \
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_cdouble[i + offset] = (double complex)src.nd_##SRC_TYPE[i]; \
+                }\
+                else \
+                {\
+                    for(int64_t i = 0; i < src.length; i++) \
+                        dest->nd_cdouble[element_index(*dest, i, dest->nd) + offset] = (double complex)src.nd_##SRC_TYPE[element_index(src, i, src.nd)]; \
+                }\
+                break; \
+        } \
+    }
+
+COPY_DATA_FROM_(bool)
+COPY_DATA_FROM_(int8)
+COPY_DATA_FROM_(int16)
+COPY_DATA_FROM_(int32)
+COPY_DATA_FROM_(int64)
+COPY_DATA_FROM_(float)
+COPY_DATA_FROM_(double)
+COPY_DATA_FROM_(cfloat)
+COPY_DATA_FROM_(cdouble)
+
+void copy_data(t_ndarray **ds, t_ndarray src, uint32_t offset, bool elem_wise_cp)
+{
+    switch(src.type)
+    {
+        case nd_bool:
+            copy_data_from_bool(ds, src, offset, elem_wise_cp);
+            break;
+
+        case nd_int8:
+            copy_data_from_int8(ds, src, offset, elem_wise_cp);
+            break;
+
+        case nd_int16:
+            copy_data_from_int16(ds, src, offset, elem_wise_cp);
+            break;
+
+        case nd_int32:
+            copy_data_from_int32(ds, src, offset, elem_wise_cp);
+            break;
+
+        case nd_int64:
+            copy_data_from_int64(ds, src, offset, elem_wise_cp);
+            break;
+
+        case nd_float:
+            copy_data_from_float(ds, src, offset, elem_wise_cp);
+            break;
+
+        case nd_double:
+            copy_data_from_double(ds, src, offset, elem_wise_cp);
+            break;
+
+        case nd_cfloat:
+            copy_data_from_cfloat(ds, src, offset, elem_wise_cp);
+            break;
+
+        case nd_cdouble:
+            copy_data_from_cdouble(ds, src, offset, elem_wise_cp);
+            break;
+    }
+}
+
 void array_copy_data(t_ndarray *dest, t_ndarray src, uint32_t offset)
 {
     unsigned char *d = (unsigned char*)dest->raw_data;
@@ -499,15 +668,11 @@ void array_copy_data(t_ndarray *dest, t_ndarray src, uint32_t offset)
         && (src.order == order_c
             || (src.order == order_f && is_same_shape(*dest, src))))
     {
-        memcpy(d + offset * dest->type_size, s, src.buffer_size);
+        copy_data(&dest, src, offset, false);
     }
     else
     {
-        for (int64_t element_num = 0; element_num < src.length; ++element_num)
-        {
-            memcpy(d + ((element_index(*dest, element_num, dest->nd) + offset) * dest->type_size),
-                s + (element_index(src, element_num, src.nd) * src.type_size), src.type_size);
-        }
+        copy_data(&dest, src, offset, true);
     }
 }
 
@@ -654,3 +819,4 @@ NUMPY_AMIN_(float32, float, float)
 NUMPY_AMIN_(float64, double, double)
 NUMPY_AMIN_(complex64, float complex, cfloat)
 NUMPY_AMIN_(complex128, double complex, cdouble)
+


Test patch:
diff --git a/tests/epyccel/modules/arrays.py b/tests/epyccel/modules/arrays.py
index 8c99a264ec..4fda55fba4 100644
--- a/tests/epyccel/modules/arrays.py
+++ b/tests/epyccel/modules/arrays.py
@@ -1746,6 +1746,307 @@ def multiple_np_linspace():
     z = np.linspace(0, 8, 128)
     return x[0] + y[1] + z[2] + linspace_index
 
+#==============================================================================
+# NUMPY ARRAY DATA TYPE CONVERSION
+#==============================================================================
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_bool(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='bool')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_int8(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='int8')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_int16(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='int16')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_int32(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='int32')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_int64(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='int64')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_float32(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='float32')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_float64(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='float64')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_cfloat(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='complex64')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_cdouble(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype='complex128')
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_pyint(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype=int)
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def dtype_convert_to_pyfloat(arr : 'T1'):
+    from numpy import shape, array
+    c = array(arr, dtype=float)
+    s = shape(c)
+    return len(s), c[0,0], c[0,1], c[1,0], c[1,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_bool(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='bool')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_int8(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='int8')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_int16(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='int16')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_int32(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='int32')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_int64(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='int64')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_float32(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='float32')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_float64(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='float64')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_cfloat(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='complex64')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_cdouble(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='complex128')
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_pyint(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype=int)
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_pyfloat(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype=float)
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_bool_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='bool', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_int8_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='int8', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_int16_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='int16', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_int32_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='int32', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_int64_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='int64', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_float32_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='float32', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_float64_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='float64', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='complex64', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype='complex128', order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_pyint_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype=int, order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
+@template('T1', ['bool[:,:]', 'int[:,:]', 'int8[:,:]', 'int16[:,:]', 'int32[:,:]', 'int64[:,:]', 'float[:,:]', 'float32[:,:]', 'float64[:,:]', 'complex64[:,:]', 'complex128[:,:]'])
+def src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(arr1 : 'T1', arr2 : 'T1', arr3 : 'T1'):
+    from numpy import shape, array
+    a = array(arr1)
+    b = array(arr2)
+    c = array(arr3)
+    d = array([a, c, b], dtype=float, order="F")
+    s = shape(d)
+    return s[0], s[1], s[2], d[0,0,0], d[0,0,1], d[1,0,0], d[1,0,1], d[2,0,0], d[2,0,1]
+
 #==============================================================================
 # Iteration
 #==============================================================================
diff --git a/tests/epyccel/test_arrays.py b/tests/epyccel/test_arrays.py
index 82d3e671d6..77324a9b55 100644
--- a/tests/epyccel/test_arrays.py
+++ b/tests/epyccel/test_arrays.py
@@ -1,8 +1,8 @@
 # pylint: disable=missing-function-docstring, missing-module-docstring
 import pytest
 import numpy as np
-from numpy import iinfo
-from numpy.random import randint
+from numpy import iinfo, finfo
+from numpy.random import randint, uniform
 
 from pyccel.epyccel import epyccel
 from modules        import arrays
@@ -3970,6 +3970,2071 @@ def test_array_ndmin_2_order(language):
     check_array_equal(f1(d), f2(d))
     check_array_equal(f1(e), f2(e))
 
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_bool_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_bool, language=language)
+
+    assert epyccel_func(bl) == arrays.dtype_convert_to_bool(bl)
+    assert epyccel_func(integer) == arrays.dtype_convert_to_bool(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_bool(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_bool(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_bool(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_bool(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_bool(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_bool(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_bool(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_bool(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_bool(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = pytest.mark.fortran),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_int8_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8   = randint(low = iinfo('int8').min,   high = iinfo('int8').max, size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_int8, language=language)
+
+    assert epyccel_func(integer) == arrays.dtype_convert_to_int8(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_int8(integer8)
+    assert epyccel_func(bl) == arrays.dtype_convert_to_int8(bl)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_int8(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_int8(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_int8(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_int8(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_int8(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_int8(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_int8(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_int8(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = pytest.mark.fortran),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_int16_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_int16, language=language)
+
+    assert epyccel_func(integer) == arrays.dtype_convert_to_int16(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_int16(integer8)
+    assert epyccel_func(bl) == arrays.dtype_convert_to_int16(bl)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_int16(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_int16(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_int16(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_int16(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_int16(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_int16(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_int16(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_int16(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = pytest.mark.fortran),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_int32_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_int32, language=language)
+
+    assert epyccel_func(integer) == arrays.dtype_convert_to_int32(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_int32(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_int32(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_int32(integer32)
+    assert epyccel_func(bl) == arrays.dtype_convert_to_int32(bl)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_int32(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_int32(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_int32(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_int32(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_int32(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_int32(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = pytest.mark.fortran),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_int64_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_int64, language=language)
+
+    assert epyccel_func(integer) == arrays.dtype_convert_to_int64(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_int64(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_int64(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_int64(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_int64(integer64)
+    assert epyccel_func(bl) == arrays.dtype_convert_to_int64(bl)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_int64(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_int64(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_int64(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_int64(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_int64(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_float32_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_float32, language=language)
+
+    assert epyccel_func(integer) == arrays.dtype_convert_to_float32(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_float32(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_float32(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_float32(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_float32(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_float32(fl)
+    assert epyccel_func(bl) == arrays.dtype_convert_to_float32(bl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_float32(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_float32(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_float32(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_float32(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_float64_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_float64, language=language)
+
+    assert epyccel_func(integer) == arrays.dtype_convert_to_float64(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_float64(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_float64(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_float64(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_float64(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_float64(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_float64(fl32)
+    assert epyccel_func(bl) == arrays.dtype_convert_to_float64(bl)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_float64(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_float64(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_float64(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_complex64_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_cfloat, language=language)
+
+    assert epyccel_func(bl) == arrays.dtype_convert_to_cfloat(bl)
+    assert epyccel_func(integer) == arrays.dtype_convert_to_cfloat(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_cfloat(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_cfloat(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_cfloat(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_cfloat(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_cfloat(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_cfloat(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_cfloat(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_cfloat(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_cfloat(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_complex128_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_cdouble, language=language)
+
+    assert epyccel_func(bl) == arrays.dtype_convert_to_cdouble(bl)
+    assert epyccel_func(integer) == arrays.dtype_convert_to_cdouble(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_cdouble(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_cdouble(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_cdouble(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_cdouble(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_cdouble(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_cdouble(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_cdouble(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_cdouble(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_cdouble(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = pytest.mark.fortran),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_pyint_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_pyint, language=language)
+
+    assert epyccel_func(bl) == arrays.dtype_convert_to_pyint(bl)
+    assert epyccel_func(integer) == arrays.dtype_convert_to_pyint(integer)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_pyint(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_pyint(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_pyint(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_pyint(integer64)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_pyint(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_pyint(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_pyint(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_pyint(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_pyint(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_dtype_conversion_to_pyfloat_from_other_types(language):
+    size = (2, 2)
+
+    bl = randint(0, 2, size = size, dtype= bool)
+
+    integer   = randint(low = iinfo('int').min,   high = iinfo('int').max, size = size, dtype=int)
+    integer8 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer16 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer32 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer64 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl32 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32 = np.float32(fl32)
+    fl64 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    cmplx128_from_float32 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx64 = np.complex64(cmplx128_from_float32)
+    cmplx128 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.dtype_convert_to_pyfloat, language=language)
+
+    assert epyccel_func(bl) == arrays.dtype_convert_to_pyfloat(bl)
+    assert epyccel_func(integer8) == arrays.dtype_convert_to_pyfloat(integer8)
+    assert epyccel_func(integer16) == arrays.dtype_convert_to_pyfloat(integer16)
+    assert epyccel_func(integer32) == arrays.dtype_convert_to_pyfloat(integer32)
+    assert epyccel_func(integer64) == arrays.dtype_convert_to_pyfloat(integer64)
+    assert epyccel_func(integer) == arrays.dtype_convert_to_pyfloat(integer)
+    assert epyccel_func(fl) == arrays.dtype_convert_to_pyfloat(fl)
+    assert epyccel_func(fl32) == arrays.dtype_convert_to_pyfloat(fl32)
+    assert epyccel_func(fl64) == arrays.dtype_convert_to_pyfloat(fl64)
+    assert epyccel_func(cmplx64) == arrays.dtype_convert_to_pyfloat(cmplx64)
+    assert epyccel_func(cmplx128) == arrays.dtype_convert_to_pyfloat(cmplx128)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_bool(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_bool, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_int8(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_int8, language=language)
+
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(integer_1, integer_2, integer_3)
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(b1, b2, b3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_int16(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_int16, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_int32(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_int32, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_int64(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_int64, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_float32(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_float32, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_float64(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_float64, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_cfloat(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_cfloat, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_cdouble(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_cdouble, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_pyint(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_pyint, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_pyfloat(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_bool_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_bool_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_int8_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF, language=language)
+
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(b1, b2, b3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int8_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_int16_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int16_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_int32_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int32_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_int64_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_int64_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_float32_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float32_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_float64_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_float64_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_cfloat_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cfloat_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+            pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_cdouble_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_cdouble_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+def test_src_dest_array_diff_sizes_dtype_conversion_to_pyint_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyint_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
+@pytest.mark.parametrize( 'language', (
+        pytest.param("fortran", marks = [
+            pytest.mark.skip(reason=("Missing boolean cast in Fortran code, see #1785")),
+                      pytest.mark.fortran]),
+        pytest.param("c", marks = pytest.mark.c),
+        pytest.param("python", marks = pytest.mark.python)
+    )
+)
+def test_src_dest_array_diff_sizes_dtype_conversion_to_pyfloat_orderF(language):
+    size = (1,2)
+
+    integer_1 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_2 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+    integer_3 = randint(low = iinfo('int').min, high = iinfo('int').max , size = size, dtype=int)
+
+    integer8_1 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_2 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+    integer8_3 = randint(low = iinfo('int8').min, high = iinfo('int8').max , size = size, dtype=np.int8)
+
+    integer16_1 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_2 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+    integer16_3 = randint(low = iinfo('int16').min, high = iinfo('int16').max , size = size, dtype=np.int16)
+
+    integer32_1 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_2 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+    integer32_3 = randint(low = iinfo('int32').min, high = iinfo('int32').max , size = size, dtype=np.int32)
+
+    integer64_1 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_2 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+    integer64_3 = randint(low = iinfo('int64').min, high = iinfo('int64').max , size = size, dtype=np.int64)
+
+    fl_1 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_2 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+    fl_3 = uniform(finfo('float').min / 2, finfo('float').max / 2, size = size)
+
+    fl32_1 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_2 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_3 = uniform(finfo('float32').min / 2, finfo('float32').max / 2, size = size)
+    fl32_1 = np.float32(fl32_1)
+    fl32_2 = np.float32(fl32_2)
+    fl32_3 = np.float32(fl32_3)
+
+    fl64_1 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_2 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+    fl64_3 = uniform(finfo('float64').min / 2, finfo('float64').max / 2, size = size)
+
+    b1 = randint(0, 2, size = size, dtype= bool)
+    b2 = randint(0, 2, size = size, dtype= bool)
+    b3 = randint(0, 2, size = size, dtype= bool)
+
+    cmplx128_from_float32_1 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_2 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+    cmplx128_from_float32_3 = uniform(low= finfo('float32').min / 2, high= finfo('float32').max / 2, size = size) + uniform(low=finfo('float32').min / 2, high=finfo('float32').max / 2, size = size) * 1j
+
+    cmplx64_1 = np.complex64(cmplx128_from_float32_1)
+    cmplx128_1 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_2 = np.complex64(cmplx128_from_float32_2)
+    cmplx128_2 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    cmplx64_3 = np.complex64(cmplx128_from_float32_3)
+    cmplx128_3 = uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) + uniform(low=finfo('float64').min / 2, high=finfo('float64').max / 2, size = size) * 1j
+
+    epyccel_func = epyccel(arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF, language=language)
+
+    assert epyccel_func(b1, b2, b3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(b1, b2, b3)
+    assert epyccel_func(integer_1, integer_2, integer_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(integer_1, integer_2, integer_3)
+    assert epyccel_func(integer8_1, integer8_2, integer8_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(integer8_1, integer8_2, integer8_3)
+    assert epyccel_func(integer16_1, integer16_2, integer16_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(integer16_1, integer16_2, integer16_3)
+    assert epyccel_func(integer32_1, integer32_2, integer32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(integer32_1, integer32_2, integer32_3)
+    assert epyccel_func(integer64_1, integer64_2, integer64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(integer64_1, integer64_2, integer64_3)
+    assert epyccel_func(fl_1, fl_2, fl_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(fl_1, fl_2, fl_3)
+    assert epyccel_func(fl32_1, fl32_2, fl32_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(fl32_1, fl32_2, fl32_3)
+    assert epyccel_func(fl64_1, fl64_2, fl64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(fl64_1, fl64_2, fl64_3)
+    assert epyccel_func(cmplx64_1, cmplx64_2, cmplx64_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(cmplx64_1, cmplx64_2, cmplx64_3)
+    assert epyccel_func(cmplx128_1, cmplx128_2, cmplx128_3) == arrays.src_dest_diff_sizes_dtype_convert_to_pyfloat_orderF(cmplx128_1, cmplx128_2, cmplx128_3)
+
 ##==============================================================================
 ## TEST ITERATION
 ##==============================================================================
@@ -3983,7 +6048,7 @@ def test_iterate_slice(language):
 @pytest.mark.parametrize( 'language', (
         pytest.param("fortran", marks = [
             pytest.mark.xfail(reason=("Cannot return a non-contiguous slice. See #1796")),
-            pytest.mark.fortran]),
+                      pytest.mark.fortran]),
         pytest.param("c", marks = pytest.mark.c),
         pytest.param("python", marks = pytest.mark.python)
     )