cosmetics: I would put `X.min(axis=0)` here and in the following checks to make the code more explicit.