Numpy in Python Track

Any plans of adding numpy to the track?
If not what is a blocker?
I have nice solution for robot simulator with rotation matrix but cannot import numpy sadly.

TL;DR: No.

Our general policy on the Python track is to stick to the standard library. The logic being that we are teaching fluency in Python programming, not in the Python scientific stack, or machine learning, or, web development.

All of the problems on the track are solvable using the standard library, without complication. The one exception I can think of currently is Unicode extended grapheme processing, which we are considering adding a library for (regex), because dealing with Unicode properly is pretty important.

There are two:

  1. The necessity of keeping the tooling builds slim. Adding libraries like Numpy and its dependancies (not to mention the other libraries in the Sci stack) add 100’s of MB to the tooling images, as well as overhead to test that all dependancies match up for all versions of Python that we support. It is a lot of bloat and work for not a whole lot of payoff. The size of tooling builds might even cancel out the proposed regex addition, we’ll have to test to make sure that it can be added.

  2. As mentioned above, there are very few exercises that would benefit from having these libraries available. More likely than not, students will reach for them unnecessarily, and produce solutions that won’t help them learn to program in core Python. If we are going to add in extra libraries, we need exercises that help students to problem solve in those libraries in an idiomatic fashion. We don’t have those exercises, and we have enough work left for core Python that we’re not planning to add those types of exercises any time soon.

Thanks for your understanding on this. :slightly_smiling_face:

3 Likes

Some background:
Exercism has to “pay” Amazon a fee every time a student clicks the test button. In the background, a docker container is prepared with all the needed dependencies and the student’s solution is tested in that container.

The bigger that container image gets, the more cost accumulates for Exercism. So one goal of the maintainers is to keep those images small. If I remember correctly, A one GB image costs around 1k€ per year. As donations sponsor the platform, that money could be used to prolong the life of Exercism instead of lining Amazon’s pockets.

Thanks for this complete explanation.
Totally understandable and it gives me a lot knowledge.

In the meantime I have just implemented small helper function for my matrix rotation, so I can say that constraints make programmer more creative :slight_smile:

I completely feel the problem, I’m also surprised how modern languages treat storage lightly. Hurts me when I need to install 100MB of node_modules to do simple JS exercise.