No video

Arrays in Python / Numpy

  Рет қаралды 211,014

APMonitor.com

APMonitor.com

Күн бұрын

Arrays are collections of strings, numbers, or other objects. This tutorial demonstrates how to create and manipulate arrays in Python with Numpy.

Пікірлер: 85
@ayouberrazki5602
@ayouberrazki5602 5 жыл бұрын
oh god finally english
@kevin_kk
@kevin_kk 5 жыл бұрын
I know 😄
@chaunceya648
@chaunceya648 4 жыл бұрын
@@kevin_kk I mean, being honest. All the tutorials I find are English....they're just in accents that are impossible to understand.
@coolmonkey619
@coolmonkey619 4 жыл бұрын
LOL!!!
@5staryzzz
@5staryzzz 4 жыл бұрын
Ikr😂
@kayzao2079
@kayzao2079 3 жыл бұрын
lmao
@omarpro8626
@omarpro8626 4 жыл бұрын
Ive been searching for this for 2 hours! Thanks alooot ❤❤
@jonathansum9084
@jonathansum9084 8 жыл бұрын
I can tell you that ur video is way more simple and easy to understand.
@MrPDawes
@MrPDawes 7 жыл бұрын
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.
@rrc
@rrc 7 жыл бұрын
Thanks, Peter. There is more Python material at my introductory course for scientists and engineers: apmonitor.com/che263
@snail8720
@snail8720 8 жыл бұрын
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...
@ericka95
@ericka95 8 жыл бұрын
You are amazing thank you so so much !
@happyfignes4392
@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
@apm Жыл бұрын
Here are videos that show how to install IDLE from Python.org: apmonitor.com/pds/index.php/Main/InstallPython
@sujaysinha81
@sujaysinha81 3 жыл бұрын
Very nice
@LaurenAnne6
@LaurenAnne6 4 жыл бұрын
Very helpful.
@user-rn5qz9eo1f
@user-rn5qz9eo1f 7 жыл бұрын
Thanks a lot ,a pretty good tutorial to follow
@qzorn4440
@qzorn4440 8 жыл бұрын
great information. thanks.
@williamswilmanalvarezzabal6064
@williamswilmanalvarezzabal6064 4 жыл бұрын
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
@apm
@apm 4 жыл бұрын
np.ones(100)*(-1)
@awaraamin9670
@awaraamin9670 8 жыл бұрын
a good one thank you!
@pratikkandalgaonkar5791
@pratikkandalgaonkar5791 4 жыл бұрын
Thankyou man 👍
@apm
@apm 4 жыл бұрын
No problem 👍
@maxschnepf8977
@maxschnepf8977 8 жыл бұрын
nice totorial. is there a possibility you could filter this high backgroud frequency out? i could enjoy it even more then
@apm
@apm 8 жыл бұрын
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.
@Bruili
@Bruili 8 жыл бұрын
I think what you call array is called list
@apm
@apm 8 жыл бұрын
+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-stefaniamoloiu2431
@alexandra-stefaniamoloiu2431 8 жыл бұрын
Your tutorial is about python data structures not mathematics. You should be more attentive to the vocabulary.
@apm
@apm 8 жыл бұрын
I appreciate the suggestions. In the future I'll use both terms to avoid confusion.
@rodolfoalvarez7141
@rodolfoalvarez7141 7 жыл бұрын
Thank you for the video.. I agree with Alexandra it is very important the vocabulary to avoid more confusion :)
@rodolfoalvarez7141
@rodolfoalvarez7141 7 жыл бұрын
"An array is a data structure that stores values of same data type. In Python, this is the main difference between arrays and lists."
@witneyh9353
@witneyh9353 6 жыл бұрын
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?
@apm
@apm 6 жыл бұрын
colors=['red','blue','yellow] print(colors[1]) Is this what you need?
@witneyh9353
@witneyh9353 6 жыл бұрын
thank you for your response! I managed to do it like this :)
@mr.melomaniacnextdoor6840
@mr.melomaniacnextdoor6840 4 жыл бұрын
Won't x[1] be 3 in 0:53?
@apm
@apm 4 жыл бұрын
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.melomaniacnextdoor6840
@mr.melomaniacnextdoor6840 4 жыл бұрын
@@apm ok thanq 😊
@vijayalakshmi6028
@vijayalakshmi6028 8 жыл бұрын
Hi, I typed the same program but it gives an error "no module name numpy"
@apm
@apm 8 жыл бұрын
+vijaya lakshmi you need to install numpy. Here are instructions for Windows: kzbin.info/www/bejne/Y53PeYyLgq1sesk
@brianholbert2080
@brianholbert2080 2 жыл бұрын
THese are lists, not arrays, Python has no array data structure built in.
@apm
@apm 2 жыл бұрын
You are correct. Please see the other helpful comments on this video.
@matthewjames7513
@matthewjames7513 7 жыл бұрын
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 :)
@apm
@apm 7 жыл бұрын
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
@sibazazo9208
@sibazazo9208 6 жыл бұрын
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
@apm
@apm 6 жыл бұрын
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/
@sibazazo9208
@sibazazo9208 6 жыл бұрын
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?
@apm
@apm 6 жыл бұрын
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
@sibazazo9208
@sibazazo9208 6 жыл бұрын
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.
@rrc
@rrc 6 жыл бұрын
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
@slickwillie3376
@slickwillie3376 2 жыл бұрын
You started with list, not array
@slickwillie3376
@slickwillie3376 2 жыл бұрын
Although, coming from another language you prolly are used to calling things like python lists "arrays" since they are similar.
@hisokamorow4082
@hisokamorow4082 3 жыл бұрын
python 3??????
@apm
@apm 3 жыл бұрын
Check out the new material for Python 3: apmonitor.github.io/begin_python
@arhamansari1312
@arhamansari1312 6 жыл бұрын
Excellent
@pothurajuashesh7165
@pothurajuashesh7165 7 жыл бұрын
2 dimensional array?
@apm
@apm 7 жыл бұрын
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.
@deojeetsarkar2006
@deojeetsarkar2006 5 жыл бұрын
thats a list
@apm
@apm 5 жыл бұрын
Thanks for the clarification. They are lists in base Python but are called Arrays / Matrices in scientific Python packages such as NumPy.
@deojeetsarkar2006
@deojeetsarkar2006 5 жыл бұрын
@@apm means there's a lot more to study now :(
@prateeksaurabh
@prateeksaurabh 5 жыл бұрын
@@apm How can list be called a array. Aint they completely different concept?
@garrett3883
@garrett3883 6 жыл бұрын
how do I get numpy.
@apm
@apm 6 жыл бұрын
Here are tips for installing NumPy: apmonitor.com/pdc/index.php/Main/InstallPython
@garrett3883
@garrett3883 6 жыл бұрын
thanks
@glamourtimeglamsquad6805
@glamourtimeglamsquad6805 6 жыл бұрын
B
@hstevens1125
@hstevens1125 4 жыл бұрын
Need to zoom in
@apm
@apm 4 жыл бұрын
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.
@5staryzzz
@5staryzzz 4 жыл бұрын
@@apm What you can do is, go to options>configure idle, and then change the size
@apm
@apm 4 жыл бұрын
@@5staryzzz Thanks!
@5staryzzz
@5staryzzz 4 жыл бұрын
@@apm Welcome!
@JoseGarcia-px9xj
@JoseGarcia-px9xj 5 жыл бұрын
did you know what this expression do (pt.numpy())
@apm
@apm 5 жыл бұрын
No, I haven't seen that before.
@PeteDork
@PeteDork 5 жыл бұрын
You kinda sound like H. Jon Benjamin aka Bob from Bob's Burgers
@apm
@apm 5 жыл бұрын
Thanks! I've heard that I sound a little like Matthew McConaughey but I also like your suggestion.
@gol1723
@gol1723 6 жыл бұрын
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.
@ghosthunter9897
@ghosthunter9897 3 жыл бұрын
Man this is not an array. It's a list. Dont fool people!
@apm
@apm 3 жыл бұрын
Thanks. A few others also made this comment. You are correct that this is the right Python terminology.
@larsmonstad
@larsmonstad 6 жыл бұрын
Buy yourself a new mic
@apm
@apm 6 жыл бұрын
Thanks for the suggestion. I did get a professional recording mic a while back and the results are much better.
Loops in Python
15:33
APMonitor.com
Рет қаралды 19 М.
Learn NUMPY in 5 minutes - BEST Python Library!
13:38
Python Programmer
Рет қаралды 844 М.
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Brawl Stars
Рет қаралды 21 МЛН
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 4 МЛН
Ultimate Guide to NumPy Arrays - VERY DETAILED TUTORIAL for beginners!
24:23
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,1 МЛН
NumPy Full Python Course - Data Science Fundamentals
52:25
NeuralNine
Рет қаралды 79 М.
computers suck at division (a painful discovery)
5:09
Low Level Learning
Рет қаралды 1,6 МЛН
SciPy Beginner's Guide for Optimization
11:03
APMonitor.com
Рет қаралды 295 М.
#26 Python Tutorial for Beginners | Array in Python
15:57
Telusko
Рет қаралды 1,3 МЛН
Python programmer vs C programmer (speedrun)
1:43
Virbox
Рет қаралды 471 М.
Python: Arrays, Lists, and List Builder
12:49
Barry Brown
Рет қаралды 96 М.
5 Math Skills Every Programmer Needs
9:08
Sahil & Sarra
Рет қаралды 1 МЛН