> Invariant: From this point on the array’s length must be 3N + 1 for some integer N.
Invariant can be checked by code, and they definitely should if your language allows constraints or asserts (checked at comptime or ran in test and debug mode)
> We use simple brute force here because instances are guaranteed to be small (see guard above).
The guard above probably conveys the information already.
> Limit each request to one day’s data; otherwise, we won’t get 1-minute resolution.
This could be a benchmark, though I wouldn't be unhappy to read this as a comment, and I wouldn't care if there was no benchmark.
A couple others could be in a separate technical doc rather than in comment. I'm on the fence about it, a bit more on your side, but there are ways and places to express intent outside of the source code that the "no comments" crowd may argue for.
As for the python example, it's a great illustration of your point, there are many comments, but it's hard to remove any. Still:
# Weights must be non-negative integers. and # The distribution must have a positive total weight.
Can be discarded without losing anything: the parameter validation they comment is already transparent, and even includes natural language in the error message, describing what happens why.
Some other comments describe the what rather than the why, but the code it refers to is dense enough that it's warranted.