[Numpy-discussion] Generalize hstack/vstack --> stack; Block matrices like in matlab
stefan.otte at gmail.com
Mon Sep 8 09:29:08 EDT 2014
quite often I work with block matrices. Matlab offers the convenient notation
[ a b; c d ]
to stack matrices. The numpy equivalent is kinda clumsy:
I wrote the little function `stack` that does exactly that:
stack([[a, b], [c, d]])
In my case `stack` replaced `hstack` and `vstack` almost completely.
If you're interested in including it in numpy I created a pull request
. I'm looking forward to getting some feedback!
More information about the NumPy-Discussion