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/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!