Arrays are collections of strings, numbers, or other objects. This tutorial demonstrates how to create and manipulate arrays in Python with Numpy.
Пікірлер: 85
@ayouberrazki56025 жыл бұрын
oh god finally english
@kevin_kk5 жыл бұрын
I know 😄
@chaunceya6484 жыл бұрын
@@kevin_kk I mean, being honest. All the tutorials I find are English....they're just in accents that are impossible to understand.
@coolmonkey6194 жыл бұрын
LOL!!!
@5staryzzz4 жыл бұрын
Ikr😂
@kayzao20793 жыл бұрын
lmao
@omarpro86264 жыл бұрын
Ive been searching for this for 2 hours! Thanks alooot ❤❤
@jonathansum90848 жыл бұрын
I can tell you that ur video is way more simple and easy to understand.
@MrPDawes7 жыл бұрын
Having never programmed in Python before, this is really a good introduction to the IDE, and basic variable/array manipulation. I like languages which are not strongly typed having grown up with BBC BASIC. Found reference to Numpy in some example code for SenseHAT code on Raspberry PI and hadn't a clue what it was. I learned more in this one tutorial than all the weeks looking at code. I'll definitely be looking out for more Tutorials by APMonitor.
@rrc7 жыл бұрын
Thanks, Peter. There is more Python material at my introductory course for scientists and engineers: apmonitor.com/che263
@snail87208 жыл бұрын
But... Those are lists... Not arrays. A list, unlike an array, doesn't have a defined data type for its objects, nor does it have a fixed size...
@ericka958 жыл бұрын
You are amazing thank you so so much !
@happyfignes4392 Жыл бұрын
Thanks for the lessons, I am new in Python and installed only ANACONDA, however cant find IDLE on my start menu. is it something wrong with my installation? thank you.
@apm Жыл бұрын
Here are videos that show how to install IDLE from Python.org: apmonitor.com/pds/index.php/Main/InstallPython
@sujaysinha813 жыл бұрын
Very nice
@LaurenAnne64 жыл бұрын
Very helpful.
@user-rn5qz9eo1f7 жыл бұрын
Thanks a lot ,a pretty good tutorial to follow
@qzorn44408 жыл бұрын
great information. thanks.
@williamswilmanalvarezzabal60644 жыл бұрын
I understood you can init an empty array with a determined dimension also you can fill the array with ones, zeros, etc but how can I init that array with -1 value?. Thanks in advanced
@apm4 жыл бұрын
np.ones(100)*(-1)
@awaraamin96708 жыл бұрын
a good one thank you!
@pratikkandalgaonkar57914 жыл бұрын
Thankyou man 👍
@apm4 жыл бұрын
No problem 👍
@maxschnepf89778 жыл бұрын
nice totorial. is there a possibility you could filter this high backgroud frequency out? i could enjoy it even more then
@apm8 жыл бұрын
I record videos on a Surface Pro laptop. The computer fan sometimes kicks on mid-recording leading to a fan noise in the background. kzbin.info/www/bejne/j321h42OmsmGosU I probably just need to get an external microphone - thanks for the suggestion.
@Bruili8 жыл бұрын
I think what you call array is called list
@apm8 жыл бұрын
+B'ur You are correct that within base Python, arrays are called lists. Within the math community, arrays can either be vectors (1D) or matrices (2D+). See lpsa.swarthmore.edu/BackGround/RevMat/MatrixReview.html for my working definition of arrays.
@alexandra-stefaniamoloiu24318 жыл бұрын
Your tutorial is about python data structures not mathematics. You should be more attentive to the vocabulary.
@apm8 жыл бұрын
I appreciate the suggestions. In the future I'll use both terms to avoid confusion.
@rodolfoalvarez71417 жыл бұрын
Thank you for the video.. I agree with Alexandra it is very important the vocabulary to avoid more confusion :)
@rodolfoalvarez71417 жыл бұрын
"An array is a data structure that stores values of same data type. In Python, this is the main difference between arrays and lists."
@witneyh93536 жыл бұрын
Hi I am unable to find how you can get the user to print the data from the array they want. For example "Red" "Blue" "Yellow" red is 0, blue is 1, yellow is 2. User enters that they want to print "1" print: Blue. How can you do this?
@apm6 жыл бұрын
colors=['red','blue','yellow] print(colors[1]) Is this what you need?
@witneyh93536 жыл бұрын
thank you for your response! I managed to do it like this :)
@mr.melomaniacnextdoor68404 жыл бұрын
Won't x[1] be 3 in 0:53?
@apm4 жыл бұрын
The x[1] indicates that we are taking the 2nd element of the list (or array). The second element has a value of 1 because it is [0,1,2,3,4].
@mr.melomaniacnextdoor68404 жыл бұрын
@@apm ok thanq 😊
@vijayalakshmi60288 жыл бұрын
Hi, I typed the same program but it gives an error "no module name numpy"
@apm8 жыл бұрын
+vijaya lakshmi you need to install numpy. Here are instructions for Windows: kzbin.info/www/bejne/Y53PeYyLgq1sesk
@brianholbert20802 жыл бұрын
THese are lists, not arrays, Python has no array data structure built in.
@apm2 жыл бұрын
You are correct. Please see the other helpful comments on this video.
@matthewjames75137 жыл бұрын
Thanks for the video! I'm trying to calculate the perimeter of a parabola. I can easily plot it once I define x and y: x=np.linspace(0,1,100) y=x*x but how do I separate out individual x and y values so that I can find the distances between them? Cheers :)
@apm7 жыл бұрын
You can separate out the elements by referencing: x[0] x[1] . y[0] y[1] . etc In a "for" loop, just use something like: for i in range(100): print(x[i]) print(y[i]) Here are some tips on finding an analytic solution to your problem: math.stackexchange.com/questions/229642/length-of-a-parabolic-curve
@sibazazo92086 жыл бұрын
thanks for the video it was very helpful i noticed that you're running python on windows 10 and i am wondering if you have any information about installing openfst toolkit on windows with python 3.6 i tried to install it using anaconda with " pip install openfst" but i got this error: cl : Command line error D8021 : invalid numeric argument '/Wno-unneeded-internal-declaration' error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2 could you help me please if you have any information about this matter
@apm6 жыл бұрын
It looks like PyPI only has source tar.gz and that you'll need to get the right compiler and options. Sometimes developers make a package that is easy to install with Linux or MacOS but can be difficult to create a binary on Windows. I like this collection of Python packages for Windows but it looks like openfst is not on the list: www.lfd.uci.edu/~gohlke/pythonlibs/
@sibazazo92086 жыл бұрын
i search this link for openfst before and i didn't find it are you saying that there is no other way to install it on windows?? or is there any other package like openfst for windows with the same commands?
@apm6 жыл бұрын
Yes, you'll need to compile it yourself. There is no Windows binary for this package. Here is some additional help on Windows compilers for Python: wiki.python.org/moin/WindowsCompilers
@sibazazo92086 жыл бұрын
sorry for disturbing you but i am new to python and i searched for days for a solution and i didn't find any i tried installing a precompiled openfst version but i didn't know for sure what to do with it i tried to compile it using visual studio and there was no error and i tried adding the debug subfolder to the user PATH but when i tried to import openfst in python interpreter it didn't work i also tried to transfer the package folder to python folder but none of the previous solutions helped could you please tell me what i have to do with the precompiled package so i can import it in the python interpreter sorry again for disturbing.
@rrc6 жыл бұрын
Siba Zazo, normally you need a whl file or else compile the package yourself from source. Have you found a whl file? Here are more tips: apmonitor.com/pdc/index.php/Main/InstallPython
@slickwillie33762 жыл бұрын
You started with list, not array
@slickwillie33762 жыл бұрын
Although, coming from another language you prolly are used to calling things like python lists "arrays" since they are similar.
@hisokamorow40823 жыл бұрын
python 3??????
@apm3 жыл бұрын
Check out the new material for Python 3: apmonitor.github.io/begin_python
@arhamansari13126 жыл бұрын
Excellent
@pothurajuashesh71657 жыл бұрын
2 dimensional array?
@apm7 жыл бұрын
An array is "an ordered series or arrangement". I'm defining a vector as a 1-D array, a matrix is a 2-D array of values. Higher order arrays can also exist in NumPy.
@deojeetsarkar20065 жыл бұрын
thats a list
@apm5 жыл бұрын
Thanks for the clarification. They are lists in base Python but are called Arrays / Matrices in scientific Python packages such as NumPy.
@deojeetsarkar20065 жыл бұрын
@@apm means there's a lot more to study now :(
@prateeksaurabh5 жыл бұрын
@@apm How can list be called a array. Aint they completely different concept?
@garrett38836 жыл бұрын
how do I get numpy.
@apm6 жыл бұрын
Here are tips for installing NumPy: apmonitor.com/pdc/index.php/Main/InstallPython
@garrett38836 жыл бұрын
thanks
@glamourtimeglamsquad68056 жыл бұрын
B
@hstevens11254 жыл бұрын
Need to zoom in
@apm4 жыл бұрын
Thanks for the suggestion. Text editors like Python IDLE don't have a zoom feature. I like to use Notepad++ for code zoom so that it is easier to see the text in the videos.
@5staryzzz4 жыл бұрын
@@apm What you can do is, go to options>configure idle, and then change the size
@apm4 жыл бұрын
@@5staryzzz Thanks!
@5staryzzz4 жыл бұрын
@@apm Welcome!
@JoseGarcia-px9xj5 жыл бұрын
did you know what this expression do (pt.numpy())
@apm5 жыл бұрын
No, I haven't seen that before.
@PeteDork5 жыл бұрын
You kinda sound like H. Jon Benjamin aka Bob from Bob's Burgers
@apm5 жыл бұрын
Thanks! I've heard that I sound a little like Matthew McConaughey but I also like your suggestion.
@gol17236 жыл бұрын
This is a great video, too bad that it calls the lists, arrays. Coming from a Java background I was confused for a good couple of hours.
@ghosthunter98973 жыл бұрын
Man this is not an array. It's a list. Dont fool people!
@apm3 жыл бұрын
Thanks. A few others also made this comment. You are correct that this is the right Python terminology.
@larsmonstad6 жыл бұрын
Buy yourself a new mic
@apm6 жыл бұрын
Thanks for the suggestion. I did get a professional recording mic a while back and the results are much better.