How to convert real numpy array to int numpy array? Tried using map directly to array but it did not work.
Tell me more
×
Stack Overflow is a question and answer site for
professional and enthusiast programmers. It's 100% free, no registration required.
Use the
|
|||
|
Some numpy functions for how to control the rounding: rint, floor,trunc, ceil. depending how u wish to round the floats, up, down, or to the nearest int.
To make one of this in to int, or one of the other types in numpy, astype (as answered by BrenBern):
|
|||||||
|