نکته برای اجرای دستورات زیر کتابخانه numpy حتما باید در سیستم شما نصب باشد کد برنامه clcclear pyimportlibimportmodulenumpy Mathematical Operations sqrt2math pymathsqrt2 Calculating the square root of 2 using Pythons builtin math module sqrt2numpy pynumpysqrt2 Calculating the square root of 2 using NumPy xrad90 xxradpi0 Convert the angle from radians to degrees cospynumpycosx Calculate the cosine of the angle sinpynumpysinx Calculate the sine of the angle tanpynumpytanx Calculate the tangent of the angle Array Operations sumarray pynumpysumpylist12345 Calculating the sum of an array polyroots pynumpyrootspylist12345 Calculating the roots of a polynomial numpyarray pynumpyarraypylist12345 Creating a NumPy array meanarray pynumpymeanpylist12345 Calculating the mean of an array stdarray pynumpystdpylist12345 Calculating the standard deviation of an array Vector Operations dotproduct pynumpydotpylist123 pylist456 Calculating the dot product of two arrays crossproduct pynumpycrosspylist123 pylist456 Calculating the cross product of two arrays Array Creation zeroArray pynumpyzerosint323 Creating a 1D array of length 3 with all values 0 onesArray pynumpyonespytupleint323 int324 Creating a 3 x 4 array with all values 1 identityMatrix pynumpyeyeint325 Creating a 5 x 5 identity matrix linspaceArray pynumpylinspaceint320 int32100 int326 Creating an array of 6 evenly divided values from 0 to 100 arangeArray pynumpyarangeint320 int3210 int323 Creating an array of values from 0 to less than 10 with step 3
آخرین جستجو ها