PYTHONCHALLENGE Telegram 1616
#دوره_تکمیلی_پایتون

کار با ابزار numpy در پایتون (2)


برای تعریف آرایه دو بعدی با استفاده از ابزار نام پای میتوانیم بدینصورت عمل کنیم:

»> a2 = np.array([[1,3,5,7],[2,4,6,8]])
»> a2
array([[1, 3, 5, 7],
[2, 4, 6, 8]])


آرایه فوق شامل دو سطر و چهار ستون می باشد.

حالا برای تبدیل یک لیست به آرایه کافیه ما داخل پرانتز اسم لیست رو قرار بدهیم:

»> l1 = [1,3,5,7]
»> a3 =np.array(l1)
»> a3
array([1, 3, 5, 7])
»> type(l1)
<type 'list'>
»> type(a3)
<type 'numpy.ndarray'>


🗂 مرکز آموزش پایتون

🆔 : @pythonchallenge
👍2



tgoop.com/pythonchallenge/1616
Create:
Last Update:

#دوره_تکمیلی_پایتون

کار با ابزار numpy در پایتون (2)


برای تعریف آرایه دو بعدی با استفاده از ابزار نام پای میتوانیم بدینصورت عمل کنیم:

»> a2 = np.array([[1,3,5,7],[2,4,6,8]])
»> a2
array([[1, 3, 5, 7],
[2, 4, 6, 8]])


آرایه فوق شامل دو سطر و چهار ستون می باشد.

حالا برای تبدیل یک لیست به آرایه کافیه ما داخل پرانتز اسم لیست رو قرار بدهیم:

»> l1 = [1,3,5,7]
»> a3 =np.array(l1)
»> a3
array([1, 3, 5, 7])
»> type(l1)
<type 'list'>
»> type(a3)
<type 'numpy.ndarray'>


🗂 مرکز آموزش پایتون

🆔 : @pythonchallenge

BY چالش پایتون


Share with your friend now:
tgoop.com/pythonchallenge/1616

View MORE
Open in Telegram


Telegram News

Date: |

On June 7, Perekopsky met with Brazilian President Jair Bolsonaro, an avid user of the platform. According to the firm's VP, the main subject of the meeting was "freedom of expression." But a Telegram statement also said: "Any requests related to political censorship or limiting human rights such as the rights to free speech or assembly are not and will not be considered." 6How to manage your Telegram channel? Although some crypto traders have moved toward screaming as a coping mechanism, several mental health experts call this therapy a pseudoscience. The crypto community finds its way to engage in one or the other way and share its feelings with other fellow members. Content is editable within two days of publishing
from us


Telegram چالش پایتون
FROM American