python: converting an numpy array data type from int64 to int

前端 未结 4 1286
甜味超标
甜味超标 2021-01-03 23:59

I am somewhat new to python and I am using python modules in another program (ABAQUS). The question, however, is completely python related.

In the program, I need to

4条回答
  •  醉酒成梦
    2021-01-04 00:25

    numpy.ndarray.tolist will do it:

    a.tolist()
    

    If your data is a pandas series you can call their tolist wrapper with the same result.

提交回复
热议问题