I have an array of n length and I want to resize it to a certain length conserving the proportions.

I would like a function like this:

```py
def rezise_my_array(array, new_lentgh)

```

For example, the input would be an array of length 9:

```py
l = [1,2,3,4,5,6,7,8,9]

```

If I rezise it to length 5, the output would be:

```py
[1,3,5,7,9]

```

or vice versa.

I need this to create a linear regression model on pyspark, since all the features must have the same length.