No need to `copy` from `d[:,3]`. Slicing already creates copies (so you're copying twice), but even if it made a view you could still just write `B = d[:, 3]`.
Ah, didn't realize slicing always made copies. A view/alias/whatever would have been fine for the example, but having multiple variable names referring to the same memory has caused me enough problems to try to avoid it by default.
Comments
No need to `copy` from `d[:,3]`. Slicing already creates copies (so you're copying twice), but even if it made a view you could still just write `B = d[:, 3]`.
Ah, didn't realize slicing always made copies. A view/alias/whatever would have been fine for the example, but having multiple variable names referring to the same memory has caused me enough problems to try to avoid it by default.