SimpleJSON and NumPy array

后端 未结 9 1370
挽巷
挽巷 2020-12-04 10:56

What is the most efficient way of serializing a numpy array using simplejson?

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 11:39

    One fast, though not truly optimal way is using Pandas:

    import pandas as pd
    pd.Series(your_array).to_json(orient='values')
    

提交回复
热议问题