Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

change dtype python

# change the dtype to 'float64'
arr = [1,2,3]
arr = arr.astype('float64')
  
# Print the array after changing
# the data type
print(arr)
  
# Also print the data type
print(arr.dtype)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #change #dtype #python
ADD COMMENT
Topic
Name
4+7 =