Hi, Le 07/12/2014 08:10, Stephan Hoyer a écrit : > In [5]: %timeit xray.core.utils.as_shape(x, y.shape) > 100000 loops, best of 3: 17 µs per loop > > Would this be a welcome addition to numpy's lib.stride_tricks? If so, > I will put together a PR. > >
Instead of putting this function in stride_tricks (which is quite hidden), could it be added instead as a boolean flag to the existing `reshape` method ? Something like: x.reshape(y.shape, broadcast=True) What other people think ? best, Pierre _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
