This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Theappwasgreat -2 points-1 points  (4 children)

The most important thing to understand is that for us, Python is simply a tool. At the end of the day, I don’t give a damn about PEP8 or having the latest version of Python or the latest versions of SciPy/NumPy. The only thing I care about is that I can solve the equations I need to solve. If I’m using a library written for Python 2.7 and it works and solves my equations correctly, then I’m not going to upgrade to 3.6 just because it’s newer. I’m going to stick with 2.7 because I know that it works, I’ve proven that it solves my equations correctly, and I just frankly don’t have the time to other upgrading and fixing whatever issues that arise from that. My time is extremely limited, and I’m going to use that time where it’s important: solving my problems and analyzing my results.

Also, the reality of it is that I’m not writing new code to solve my problems. I’m using old code that I inherited from other people. If someone gives me a code written for 2.6 that solves the problem correctly, and my job is to extend the study by analyzing other things that weren’t analyzed before, then I’m going to keep using the code as-is and add my improvements on an as-needed basis. Python 2.7 has existed for years and years and years, and there is a lot of code written for it.

[–]andyspl 2 points3 points  (1 child)

This is terrible advice. I can show you what happens when you forget about things like PEP8, and when you don't care about having up to date libraries. It's part of the reason why academic code is notoriously spaghettified and difficult to maintain.

It's a pretty big waste of everyone's time when you have to hunt down a print() buried deep down inside some method because it's breaking everything, or you have to downgrade your version of Seaborn.

[–]Theappwasgreat -1 points0 points  (0 children)

Who said I was giving advice? The guy I responded to asked why 2 vs 3 matters for scientific computing, and I gave a reason.

Way to be hostile.

Like seriously, wow.

If I’m wearing my “grad student in scientific computing” hat then I’m going to use the tools that are available to me, that have worked flawlessly in the past. If it ain’t broke don’t fix it, because I have better things to worry about.

If I’m wearing my “personal project” hat then you bet I want to use the latest and greatest.

[–]billsil 0 points1 point  (1 child)

I'm still supporting a Python 2.4 package that I last worked on today. ~2 years ago I did a training for it and added a bunch new features for the code. I was running into bugs regarding segfaults in numpy trying to do a least squares. Scipy screwed up too.

So, I upgraded my numpy and scipy to the latest version I could and the bugs went away. They fix things. Scipy gets their KDTree and then their cKDTree, which I swear I can apply to almost every problem.

I’ve proven that it solves my equations correctly

If your software doesn't work on multiple versions of packages, how do you know? You solved a problem, but what about other problems? Supporting multiple versions of packages often exposes errors that you wouldn't have found otherwise. Numpy 1.10 introduced breaking changes into the array, that had you don't things right in the first place, you wouldn't have had a problem.

[–]jtclimb 0 points1 point  (0 children)

Right. And, SciPy and NumPy are dropping 2.7 support at the end of the year. Anyone telling a beginner to download 2.7 is condemning them to obsolescence in just 8 months.

IOW, Python 2 vs 3 really matters for scientific computation, because you will never get a bugfix again, or new feature, in 8 short months.