SyntaxFix
Write A Post
Hire A Developer
Questions
Use .astype.
.astype
>>> a = numpy.array([1, 2, 3, 4], dtype=numpy.float64) >>> a array([ 1., 2., 3., 4.]) >>> a.astype(numpy.int64) array([1, 2, 3, 4])
See the documentation for more options.