Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-10 Thread Stephan Hoyer
On Thu, Nov 9, 2017 at 2:49 PM Allan Haldane wrote: > Maybe we should reword the vstack docstring so that it doesn't imply > that vstack is going away. It should say something weaker > like "the functions np.stack, np.concatenate, and np.block are often > more general/useful/less confusing altern

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Gael Varoquaux
Another point in defence of vstack vs stack/concatenate: last time I looked, it was faster on smallish arrays. Gaël ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Robert Kern
On Thu, Nov 9, 2017 at 2:49 PM, Allan Haldane wrote: > > On 11/09/2017 05:39 PM, Robert Kern wrote: > > On Thu, Nov 9, 2017 at 1:58 PM, Mark Bakker wrote: > > > >> Can anybody explain why vstack is going the way of the dodo? > >> Why are stack / concatenate better? What is 'bad' about vstack? > >

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Allan Haldane
On 11/09/2017 05:39 PM, Robert Kern wrote: > On Thu, Nov 9, 2017 at 1:58 PM, Mark Bakker wrote: > >> Can anybody explain why vstack is going the way of the dodo? >> Why are stack / concatenate better? What is 'bad' about vstack? > > As far as I can tell, the discussion happened all on Github, no

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Robert Kern
On Thu, Nov 9, 2017 at 1:58 PM, Mark Bakker wrote: > Can anybody explain why vstack is going the way of the dodo? > Why are stack / concatenate better? What is 'bad' about vstack? As far as I can tell, the discussion happened all on Github, not the mailing list. See here for references: https:/

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Stephan Hoyer
I'm pretty sure I wrote the offending line in the vstack() docs. The original motivation for stack() was that stacking behavior of hstack(), vstack() and dstack() was somewhat inconsistent, especially with regard to lower dimensional input. stack() is conceptually much simpler and more general. T

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Eric Wieser
I think the primary problems with it are: - A poor definition of “vertical” in the world of stacked matrices - in np.linalg land, this means axis=-2, but in vstack land, it means axis=0. - Mostly undocumented auto-2d behavior that doesn’t make you think well enough about dimensions. Nu

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Mark Bakker
> On 11/09/2017 04:30 AM, Joe wrote: > > Hello, > > > > I have a question and hope that you can help me. > > > > The doc for vstack mentions that "this function continues to be > > supported for backward compatibility, but you should prefer > > np.concatenate or np.stack." > > > > Using vstack was

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Robert Kern
On Thu, Nov 9, 2017 at 1:30 AM, Joe wrote: > > Hello, > > I have a question and hope that you can help me. > > The doc for vstack mentions that "this function continues to be supported for backward compatibility, but you should prefer np.concatenate or np.stack." > > Using vstack was convenient be

Re: [Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Allan Haldane
On 11/09/2017 04:30 AM, Joe wrote: > Hello, > > I have a question and hope that you can help me. > > The doc for vstack mentions that "this function continues to be > supported for backward compatibility, but you should prefer > np.concatenate or np.stack." > > Using vstack was convenient becaus

[Numpy-discussion] np.vstack vs. np.stack

2017-11-09 Thread Joe
Hello, I have a question and hope that you can help me. The doc for vstack mentions that "this function continues to be supported for backward compatibility, but you should prefer np.concatenate or np.stack." Using vstack was convenient because "the arrays must have the same shape along all