Exercise

# Create a function that returns a NumPy array

In this exercise, we'll continue working with the `numpy`

package and our previous structures.

We'll create a NumPy array of the float (numerical) data type so that we can work with a multi-dimensional data objects, much like columns and rows in a spreadsheet.

Instructions

**100 XP**

- Import
`numpy`

as`np`

. - Declare variable
`my_matrix`

and set it to`[[1,2,3,4], [5,6,7,8]]`

. - Declare a function called
`return_array()`

, which takes a list`matrix`

as input, and returns an`array`

object as output. In the body, declare a variable`array`

set it to`np.array(matrix, dtype = float)`

. - Call
`return_array()`

on the`my_matrix`

list, and print out the output.