Removed unnecessary copy() and changed to preprocessing.safe_asarray