Get the App
SLTechnology News&Howtos  ›  Development  › 

How to transform between the array of numpy and the list of python

Shulou Source: shulou.com Published: 2022-06-03 18:05:20 11月13日 Update

This article mainly introduces how to transform numpy's array and python's own list into each other, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.

A = (3.234, 34, 3.777, 6.33)

An is the list type of python

Convert a to the array of numpy:

Np.array (a) array ([3.234, 34. , 3.777, 6.33])

Convert a to list of python

A.tolist () Thank you for reading this article carefully. I hope the article "how to transform between the array of numpy and the list in python" shared by the editor will be helpful to everyone. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Articles between value interest at the same time more friends knowledge types editing industry information information channels channels reference learning help support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info macOS Microsoft Xiaomi Shulou Information