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

کار با متدهای numpy - بخش دوم

اگر بخواهیم آرایه بصورت complex تعریف کنم میتوانیم با تعریف کردن dtype از نوع complex بصورت زیر اینکار را انجام بدهیم.
نکته : نوع داده complex برای اعداد مختلط استفاده می باشد.

»> import numpy as np
»> a9 = np.array([[1,1],[3,3]],dtype = complex)
»> print a9
[[ 1.+0.j 1.+0.j]
[ 3.+0.j 3.+0.j]]


متد سایز (size) تعداد عناصر کل آرایه رو نشون میده.
»> a9.size
4


متد ndim هم تعداد ابعاد آرایه رو مشخص میکند
»> a9.ndim
2


نکته: این متدها در حل سوالات برنامه نویسی کاربرد زیادی دارند.

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

@pythonchallenge
👍1



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

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

کار با متدهای numpy - بخش دوم

اگر بخواهیم آرایه بصورت complex تعریف کنم میتوانیم با تعریف کردن dtype از نوع complex بصورت زیر اینکار را انجام بدهیم.
نکته : نوع داده complex برای اعداد مختلط استفاده می باشد.

»> import numpy as np
»> a9 = np.array([[1,1],[3,3]],dtype = complex)
»> print a9
[[ 1.+0.j 1.+0.j]
[ 3.+0.j 3.+0.j]]


متد سایز (size) تعداد عناصر کل آرایه رو نشون میده.
»> a9.size
4


متد ndim هم تعداد ابعاد آرایه رو مشخص میکند
»> a9.ndim
2


نکته: این متدها در حل سوالات برنامه نویسی کاربرد زیادی دارند.

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

@pythonchallenge

BY چالش پایتون


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

View MORE
Open in Telegram


Telegram News

Date: |

Telegram has announced a number of measures aiming to tackle the spread of disinformation through its platform in Brazil. These features are part of an agreement between the platform and the country's authorities ahead of the elections in October. Invite up to 200 users from your contacts to join your channel To upload a logo, click the Menu icon and select “Manage Channel.” In a new window, hit the Camera icon. Healing through screaming therapy "Doxxing content is forbidden on Telegram and our moderators routinely remove such content from around the world," said a spokesman for the messaging app, Remi Vaughn.
from us


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