r/PythonLearning • u/Emergency_Evening616 • 2d ago
Help Request Beginner-friendly Python resources for someone transitioning from Psychology to Computational Neuroscience?
Hi everyone!
I'm a Psychology graduate currently considering pursuing a Master's degree in Computational Neuroscience. Coming from a non-computer science background, I realize that I need to build a solid foundation in programming, particularly Python, before diving deeper into the field.
I've been trying to find introductory resources and came across Neuromatch Academy's Computational Neuroscience course, including their introductory materials.
However, I've found that even though the course is intended for beginners, I still struggle quite a bit with the Python explanations and code structure. I often find myself having difficulty understanding what's happening in the code itself, rather than focusing on the computational neuroscience concepts being taught.
I'm wondering if there are other resources that might be more suitable for someone in my position.
Ideally, I'm looking for resources that:
1.Start from the absolute basics, assuming little to no prior programming experience.
2.Explain programming concepts and code structure slowly and intuitively, rather than jumping straight into complex examples.
3.Gradually introduce concepts that are relevant to computational neuroscience (e.g., NumPy, SciPy, data analysis, mathematical modeling, simulations, etc.).
Help me understand not just how to write code, but also why certain approaches are used.
I'm open to pretty much any format: YouTube tutorials, online courses, textbooks, interactive platforms, or even a recommended learning sequence.
For additional context, my academic background is in Psychology, and I have very little programming experience. I'm not necessarily looking to jump straight into computational neuroscience yet; I'd rather develop a comfortable understanding of Python first, while keeping my long-term goal in mind.
For those who came from a non-CS background, how did you approach learning programming before getting into computational neuroscience? Are there any resources or learning paths you'd particularly recommend?
I'd really appreciate any suggestions. Thanks!
4
u/stepback269 2d ago
"3.Gradually introduce concepts that are relevant to computational neuroscience (e.g., NumPy, SciPy, data analysis, mathematical modeling, simulations, etc.)."
Perhaps you are going too fast, too far at this stage?
As a beginner, you need to consider yourself a baby and learn to crawl (learn the "fundamentals") before you can stand up and walk or sprint. So search for the Python "fundamentals" on Google and/or YouTube.
As for a roadmap tailored to your goals, that's going to be difficult. Python is a vast and expansive universe. There is never going to be a "one" soulmate tutorial that works "best" for you and with regard to every aspect of Python. With each step up that learning curve, you're going to have to shop around until you find a teacher/resource that "clicks and sticks" especially for you.
With that said:
(1) There are tons and tons of tutorial materials out there on the net including many good YouTube ones that are free. You should shop around rather than putting all your eggs in one basket.
(2) As a relative noob myself, I've been logging my personal learning journey and adding to it on an almost-daily basis at a blog page called "Links for Python Noobs" (--HERE--) Any of the top listed ones on that page should be good for you. And there are many add-ons at the tail end of the page. Personally, I cut my first Python teeth with Nana's Zero to Hero (==HERE==). Since then, I've moved on to watching short lessons with Indently and Tech with Tim. You should sample at least a few until you find a lecturer that suits your style.
(3) The main piece of advice is the 80/20 rule. Spend 80% of your time writing your own code (using your own fingers and your own creativity) as opposed to copying recipes and only 20% watching the lectures. Good luck.
3
u/nullptr_0x 2d ago
Seems like you're probably looking for a data science in Python course.
I've reviewed those courses before. My wife took one and I often helped her. I have generally observed that they sort of slack on the actual programming side. (No surprise they're basically only trying to teach you enough programming to perform particular functions and tasks that a researcher needs to do.)
If you're wanting a good introduction to programming in Python, I have a free course I made for some friends.
https://understandit.dev Programming 101 Python
2
2
u/Fabulous_Panic_7263 2d ago
I'd say just start with the basics and try building small projects along the way
2
u/seanv507 2d ago
Op, can you paste an example of neuromatches introductory materials to give an example of what you are struggling with?
One option might be using an ai to explain the introductory materials.. ie to use it as a teaching assistant, whenever you are stuck. I suspect that will actually be the most effective way of getting answers to the specific questions you have.
2
u/Personal-March-4340 2d ago
W3schools is free. I used their tutorial in my Java class. I imagine python is about the same. Your list of things to learn sounds pretty ambitious. I wonder if you realize the amount of work you are biting off with your agenda.
4
u/Naive_Programmer_232 2d ago edited 2d ago
i'd probably start off with some basics of core python then go through the numpy / pandas / polars / matplotlib / seaborn landscape more so. these libraries tend to be integrated into other ones in the data analysis / data science space. learning them can give a good foundation of the objects / data structures you'll come across frequently.
while learning core python can be really helpful, you will definitely use it in the next steps to glue everything together, you don't want to go too deep at least initially. you'll see in these extended libraries there is a lot of syntax/semantics magic that extends regular python; that require more work in the core language to do. in addition because those libraries are built for data-heavy tasks more so, they are much more efficient than what python offers out of the box, they're very R-like.
ex core (matrix multiplication + solving matrix equation for q with regular python + standard library) :
ex (matrix multiplication + solving matrix equation with
numpyandscipy):As you can probably tell above haha, without scipy or numpy in the mix, you have to define quite a bit in order to do the same with regular python, lots of looping, using standard library features. So that in some sense, is what I was mentioning prior when it comes to the 'syntax/semantic magic' these libraries provide, same is true with pandas and others in the same realm. They all work with each other and they do more than python out of the box, more efficient (vectorization R-like operations) and better for handling bigger / more complex data.
For the basics mention with python, I'd go:
variables / data types
conditionals (if/elif/else)
builtin data structures (str/tuple vs list/set/dict)
loops (for loops / while loops)
comprehensions (list/dict comprehension vs generator expressions)
pip/imports & working with libraries (start with standard library)
file IO (read/write/append .txt and .csv + path libraries)
functions (regular using 'def' as well as lambda functions)
type handling & verification (try/except/else/finally + verification)
basic OOP: classes/methods/attributes -> single inheritance + encapsulation
That should be enough to give you a decent foundation to jump into the data-world libraries. You don't have to do all of the above, this is just my suggestion, you could get away with less as well though.
Anyway, good luck with everything. Hopefully this helps!