Adds device keyword argument to astype
#1511
Merged
device keyword argument to astype
#1511