Python: Change a float array element to an integer value, but python outputs the integer value in float format

后端 未结 0 813
故里飘歌
故里飘歌 2021-01-03 06:55

I have a python numpy array: y = np.array([5.2,1]) . Now I want to change y[0] to 1: y[0] = 1

But Python output is: array([1., 1.])

Somehow it writes the integ

相关标签:
回答
  • 消灭零回复
提交回复
热议问题