On Thu, Apr 7, 2016 at 3:26 PM, Ian Henriksen < insertinterestingnameh...@gmail.com> wrote:
> On Thu, Apr 7, 2016 at 12:31 PM <josef.p...@gmail.com> wrote: > >> write unit tests with non square 2d arrays and the exception / test error >> shows up fast. >> >> Josef >> >> > Absolutely, but good programming practices don't totally obviate helpful > error > messages. > The current behavior is perfectly well defined, and I don't want a lot of warnings showing up because .T works suddenly only for ndim != 1. I make lots of mistakes during programming. But shape mismatch are usually very fast to catch. If you want safe programming, then force everyone to use only 2-D like in matlab. It would have prevented me from making many mistakes. >>> np.array(1).T array(1) another noop. Why doesn't it convert it to 2d? Josef > > Best, > -Ian > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > https://mail.scipy.org/mailman/listinfo/numpy-discussion > >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion