<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/doc/source/reference/routines.array-manipulation.rst, branch dependabot/pip/gitpython-3.1.14</title>
<subtitle>github.com: numpy/numpy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/'/>
<entry>
<title>DOC: Fix some references</title>
<updated>2020-10-24T05:00:37+00:00</updated>
<author>
<name>takanori-pskq</name>
<email>takanori17h@gmail.com</email>
</author>
<published>2020-10-24T04:49:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=14bb26753df4ca4ef42ecd830699433ed781cf9f'/>
<id>14bb26753df4ca4ef42ecd830699433ed781cf9f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: Unify cross-references between array joining methods</title>
<updated>2020-05-10T14:52:37+00:00</updated>
<author>
<name>Tim Hoffmann</name>
<email>2836374+timhoffm@users.noreply.github.com</email>
</author>
<published>2020-05-10T02:21:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=a1800a7dfe68c499e0da41ec4037eba42ba2051c'/>
<id>a1800a7dfe68c499e0da41ec4037eba42ba2051c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: add numpy.shape to index</title>
<updated>2019-10-15T06:54:29+00:00</updated>
<author>
<name>mattip</name>
<email>matti.picus@gmail.com</email>
</author>
<published>2019-10-15T06:54:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=cf2f4e0782f130258d3bdafebfbcab889874610a'/>
<id>cf2f4e0782f130258d3bdafebfbcab889874610a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Add a block function for creating stacked block arrays.</title>
<updated>2017-04-20T20:30:01+00:00</updated>
<author>
<name>Stefan Otte</name>
<email>stefan.otte@gmail.com</email>
</author>
<published>2014-09-07T14:47:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=f5c27d4e567ca6c00d38f011a1b6b342c810fb15'/>
<id>f5c27d4e567ca6c00d38f011a1b6b342c810fb15</id>
<content type='text'>
Add a block function to the current stacking functions vstack, hstack,
stack. It is similar to Matlab's square bracket stacking functionality
for block matrices.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a block function to the current stacking functions vstack, hstack,
stack. It is similar to Matlab's square bracket stacking functionality
for block matrices.
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Add generalized flip function and its tests</title>
<updated>2016-03-12T18:07:43+00:00</updated>
<author>
<name>Eren Sezener</name>
<email>erensezener@gmail.com</email>
</author>
<published>2016-02-26T12:24:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=e7de401f5c9634a2a63eb8f44f2193be1a946191'/>
<id>e7de401f5c9634a2a63eb8f44f2193be1a946191</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: moveaxis function</title>
<updated>2016-01-09T23:56:13+00:00</updated>
<author>
<name>Stephan Hoyer</name>
<email>shoyer@climate.com</email>
</author>
<published>2015-11-05T04:08:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=8ffde7f488eb583ed2a200702e85a6518c4f94ec'/>
<id>8ffde7f488eb583ed2a200702e85a6518c4f94ec</id>
<content type='text'>
Fixes GH2039

This function provides a much more intuitive interface than `np.rollaxis`,
which has a confusing behavior with the position of the `start` argument:
http://stackoverflow.com/questions/29891583/reason-why-numpy-rollaxis-is-so-confusing

It was independently suggested several times over the years after discussions
on the mailing list and GitHub (GH2039), but never made it into a pull request:
https://mail.scipy.org/pipermail/numpy-discussion/2010-September/052882.html

My version adds support for a sequence of axis arguments. I find this behavior
to be very useful. It is often more intuitive than supplying a list of
arguments to `transpose` and also nicely generalizes NumPy's existing axis
manipulation routines, e.g.,

    def transpose(a, order=None):
        if order is None:
            order = reversed(range(a.ndim))
        return moveaxes(a, order, range(a.ndim))

    def swapaxes(a, axis1, axis2):
        return moveaxes(a, [axis1, axis2], [axis2, axis1])

    def rollaxis(a, axis, start=0):
        if axis &lt; start:
            start -= 1
        return moveaxes(a, axis, start)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes GH2039

This function provides a much more intuitive interface than `np.rollaxis`,
which has a confusing behavior with the position of the `start` argument:
http://stackoverflow.com/questions/29891583/reason-why-numpy-rollaxis-is-so-confusing

It was independently suggested several times over the years after discussions
on the mailing list and GitHub (GH2039), but never made it into a pull request:
https://mail.scipy.org/pipermail/numpy-discussion/2010-September/052882.html

My version adds support for a sequence of axis arguments. I find this behavior
to be very useful. It is often more intuitive than supplying a list of
arguments to `transpose` and also nicely generalizes NumPy's existing axis
manipulation routines, e.g.,

    def transpose(a, order=None):
        if order is None:
            order = reversed(range(a.ndim))
        return moveaxes(a, order, range(a.ndim))

    def swapaxes(a, axis1, axis2):
        return moveaxes(a, [axis1, axis2], [axis2, axis1])

    def rollaxis(a, axis, start=0):
        if axis &lt; start:
            start -= 1
        return moveaxes(a, axis, start)
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #5605 from shoyer/stack</title>
<updated>2015-05-12T04:43:16+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2015-05-12T04:43:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=18c89dbf87929e68479b2272ad7ab4b321120773'/>
<id>18c89dbf87929e68479b2272ad7ab4b321120773</id>
<content type='text'>
ENH: add np.stack</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ENH: add np.stack</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: add np.stack</title>
<updated>2015-05-12T04:18:24+00:00</updated>
<author>
<name>Stephan Hoyer</name>
<email>shoyer@climate.com</email>
</author>
<published>2015-02-25T09:49:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=93d3b8dedc5cd602c867a234f07188fe5bd5479b'/>
<id>93d3b8dedc5cd602c867a234f07188fe5bd5479b</id>
<content type='text'>
The motivation here is to present a uniform and N-dimensional interface for
joining arrays along a new axis, similarly to how `concatenate` provides a
uniform and N-dimensional interface for joining arrays along an existing axis.

Background
~~~~~~~~~~

Currently, users can choose between `hstack`, `vstack`, `column_stack` and
`dstack`, but none of these functions handle N-dimensional input. In my
opinion, it's also difficult to keep track of the differences between these
methods and to predict how they will handle input with different
dimensions.

In the past, my preferred approach has been to either construct the result
array explicitly and use indexing for assignment, to or use `np.array` to
stack along the first dimension and then use `transpose` (or a similar method)
to reorder dimensions if necessary. This is pretty awkward.

I brought this proposal up a few weeks on the numpy-discussion list:
http://mail.scipy.org/pipermail/numpy-discussion/2015-February/072199.html

I also received positive feedback on Twitter:
https://twitter.com/shoyer/status/565937244599377920

Implementation notes
~~~~~~~~~~~~~~~~~~~~

The one line summaries for `concatenate` and `stack` have been (re)written to
mirror each other, and to make clear that the distinction between these functions
is whether they join over an existing or new axis.

In general, I've tweaked the documentation and docstrings with an eye toward
pointing users to `concatenate`/`stack`/`split` as a fundamental set of basic
array manipulation routines, and away from
`array_split`/`{h,v,d}split`/`{h,v,d,column_}stack`

I put this implementation in `numpy.core.shape_base` alongside `hstack`/`vstack`,
but it appears that there is also a `numpy.lib.shape_base` module that contains
another larger set of functions, including `dstack`. I'm not really sure where
this belongs (or if it even matters).

Finally, it might be a good idea to write a masked array version of `stack`.
But I don't use masked arrays, so I'm not well motivated to do that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The motivation here is to present a uniform and N-dimensional interface for
joining arrays along a new axis, similarly to how `concatenate` provides a
uniform and N-dimensional interface for joining arrays along an existing axis.

Background
~~~~~~~~~~

Currently, users can choose between `hstack`, `vstack`, `column_stack` and
`dstack`, but none of these functions handle N-dimensional input. In my
opinion, it's also difficult to keep track of the differences between these
methods and to predict how they will handle input with different
dimensions.

In the past, my preferred approach has been to either construct the result
array explicitly and use indexing for assignment, to or use `np.array` to
stack along the first dimension and then use `transpose` (or a similar method)
to reorder dimensions if necessary. This is pretty awkward.

I brought this proposal up a few weeks on the numpy-discussion list:
http://mail.scipy.org/pipermail/numpy-discussion/2015-February/072199.html

I also received positive feedback on Twitter:
https://twitter.com/shoyer/status/565937244599377920

Implementation notes
~~~~~~~~~~~~~~~~~~~~

The one line summaries for `concatenate` and `stack` have been (re)written to
mirror each other, and to make clear that the distinction between these functions
is whether they join over an existing or new axis.

In general, I've tweaked the documentation and docstrings with an eye toward
pointing users to `concatenate`/`stack`/`split` as a fundamental set of basic
array manipulation routines, and away from
`array_split`/`{h,v,d}split`/`{h,v,d,column_}stack`

I put this implementation in `numpy.core.shape_base` alongside `hstack`/`vstack`,
but it appears that there is also a `numpy.lib.shape_base` module that contains
another larger set of functions, including `dstack`. I'm not really sure where
this belongs (or if it even matters).

Finally, it might be a good idea to write a masked array version of `stack`.
But I don't use masked arrays, so I'm not well motivated to do that.
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: add broadcast_to function</title>
<updated>2015-02-27T02:15:44+00:00</updated>
<author>
<name>Stephan Hoyer</name>
<email>shoyer@climate.com</email>
</author>
<published>2015-01-15T07:41:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=05b5335ecf25e59477956b4f85b9a8edbdf71bcc'/>
<id>05b5335ecf25e59477956b4f85b9a8edbdf71bcc</id>
<content type='text'>
Per the mailing list discussion [1], I have implemented a new function
`broadcast_to` that broadcasts an array to a given shape according to
numpy's broadcasting rules.

[1] http://mail.scipy.org/pipermail/numpy-discussion/2014-December/071796.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Per the mailing list discussion [1], I have implemented a new function
`broadcast_to` that broadcasts an array to a given shape according to
numpy's broadcasting rules.

[1] http://mail.scipy.org/pipermail/numpy-discussion/2014-December/071796.html
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: add ascontiguousarray and asarray_chkfinite to appropriate section</title>
<updated>2014-07-27T18:04:43+00:00</updated>
<author>
<name>Julian Taylor</name>
<email>jtaylor.debian@googlemail.com</email>
</author>
<published>2014-07-18T21:18:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=9e8c1ad06cfdab3cb8e7f266b31fd677b945e106'/>
<id>9e8c1ad06cfdab3cb8e7f266b31fd677b945e106</id>
<content type='text'>
added to "Changing kind of array" with the other as* functions
Closes gh-4890
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
added to "Changing kind of array" with the other as* functions
Closes gh-4890
</pre>
</div>
</content>
</entry>
</feed>
