Answers for "how to convert an array from float to int in python"

1

convert all values in array into float

import numpy as np
x = np.array(['1.1', '2.2', '3.3'])
y = x.astype(np.float)
Posted by: Guest on March-06-2020
2

float to int in python

# convert float to int 

int(2.0) #output :2
Posted by: Guest on May-27-2020

Code answers related to "how to convert an array from float to int in python"

Python Answers by Framework

Browse Popular Code Answers by Language