Telegram Group & Telegram Channel
جستجوی یک مقدار در آرایه
خیلی از اوقات می خواهیم یک شرط خاص را بر روی یک آرایه numpy بررسی کنیم. البته استفاده از یک حلقه و بررسی تک تک مقادیر با If یک راه مقدماتی است اما در numpy برای این مسئله تابع where ارائه شده است. به کمک این تابع می توانید یک شرط خاص را روی تمامی اعضای یک آرایه لحاظ کنید.
در مثال این پست در بین اعداد 1 تا 100 ، اعدادی که باقیمانده مجذور آنها به اضافه سه تقسیم بر هفت ((a**2+3)%7==0) برابر صفر می شود یا اعدادی که مضرب هشت هستند را انتخاب می کنیم.

#پایتون_مالی
#numpy
#where


عضویت در کانال پایتون برای مالی
www.tg-me.com/joinchat-AAAAAFGMkouqbsb86Vfzug



tg-me.com/python4finance/755
Create:
Last Update:

جستجوی یک مقدار در آرایه
خیلی از اوقات می خواهیم یک شرط خاص را بر روی یک آرایه numpy بررسی کنیم. البته استفاده از یک حلقه و بررسی تک تک مقادیر با If یک راه مقدماتی است اما در numpy برای این مسئله تابع where ارائه شده است. به کمک این تابع می توانید یک شرط خاص را روی تمامی اعضای یک آرایه لحاظ کنید.
در مثال این پست در بین اعداد 1 تا 100 ، اعدادی که باقیمانده مجذور آنها به اضافه سه تقسیم بر هفت ((a**2+3)%7==0) برابر صفر می شود یا اعدادی که مضرب هشت هستند را انتخاب می کنیم.

#پایتون_مالی
#numpy
#where


عضویت در کانال پایتون برای مالی
www.tg-me.com/joinchat-AAAAAFGMkouqbsb86Vfzug

BY Python4Finance




Share with your friend now:
tg-me.com/python4finance/755

View MORE
Open in Telegram


Python4Finance Telegram | DID YOU KNOW?

Date: |

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

Launched in 2013, Telegram allows users to broadcast messages to a following via “channels”, or create public and private groups that are simple for others to access. Users can also send and receive large data files, including text and zip files, directly via the app.The platform said it has more than 500m active users, and topped 1bn downloads in August, according to data from SensorTower.Python4Finance from es


Telegram Python4Finance
FROM USA