Also please use `.ravel()` instead of `.flatten()` to spare a memory copy when not necessary.