Dataframe object has no attribute to_numpy

I keep getting the error message
“dataframe object has no attribute to_numpy”
when running the function “dataframe_to_arrays”
May anyone please help me resolve it?