<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/core/include, branch pr/12889</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>BUG: Add timsort without breaking the API.</title>
<updated>2019-02-07T21:54:27+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2019-02-07T02:01:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=d3eb626ef41e1302631b5154037567b9cc02630d'/>
<id>d3eb626ef41e1302631b5154037567b9cc02630d</id>
<content type='text'>
In order to maintain forward compatibility it is necessary to keep the
size of PyArray_ArrFuncs struct fixed. The usual trick of adding new
elements to the end of the structure is not available in this case
because the struct may be instanciated by user types and we have no way
to know whether the new or old struct is in play.

The solution adopted here is the reuse the (a)mergesort slots for stable
sorts of all kinds, with the actual kind set when the struct is
initialized. The '(a)mergesort' option thus becomes an alias for
'stable', but we keep it for backwards compatibility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to maintain forward compatibility it is necessary to keep the
size of PyArray_ArrFuncs struct fixed. The usual trick of adding new
elements to the end of the structure is not available in this case
because the struct may be instanciated by user types and we have no way
to know whether the new or old struct is in play.

The solution adopted here is the reuse the (a)mergesort slots for stable
sorts of all kinds, with the actual kind set when the struct is
initialized. The '(a)mergesort' option thus becomes an alias for
'stable', but we keep it for backwards compatibility.
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: preliminary numeric timsort</title>
<updated>2019-01-21T12:42:36+00:00</updated>
<author>
<name>wtli</name>
<email>liwt31@163.com</email>
</author>
<published>2018-11-12T03:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=19952f4ad0345f8ea0398b4983384c3dc8a8f3bb'/>
<id>19952f4ad0345f8ea0398b4983384c3dc8a8f3bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Added parens to macro argument expansions</title>
<updated>2019-01-15T19:30:46+00:00</updated>
<author>
<name>Joseph Fox-Rabinovitz</name>
<email>madphysicist@users.noreply.github.com</email>
</author>
<published>2019-01-15T19:30:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=ac39d763bc2700f6595d806a4bca8a2a62cecab6'/>
<id>ac39d763bc2700f6595d806a4bca8a2a62cecab6</id>
<content type='text'>
Some of the arguments were not being expanded in parens. Should be a pretty straightforward fix. This is not an exhaustive fix, but most of the other macros in this file look OK.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some of the arguments were not being expanded in parens. Should be a pretty straightforward fix. This is not an exhaustive fix, but most of the other macros in this file look OK.</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: reference cycle in np.vectorize (#11977)</title>
<updated>2019-01-09T14:28:09+00:00</updated>
<author>
<name>Matti Picus</name>
<email>matti.picus@gmail.com</email>
</author>
<published>2019-01-09T14:28:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=f5b6850f231de80b067e06e01d11bec4bd535c58'/>
<id>f5b6850f231de80b067e06e01d11bec4bd535c58</id>
<content type='text'>
This implements cyclic support by adding `tp_traverse` to ufuns which may contain
a user provided object function (`np.frompyfunc`). Ufuncs that do not add this are not
added to the circular reference count tracking.

The ufunc does not need to implement `tp_clear` because it is an immutable object.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements cyclic support by adding `tp_traverse` to ufuns which may contain
a user provided object function (`np.frompyfunc`). Ufuncs that do not add this are not
added to the circular reference count tracking.

The ufunc does not need to implement `tp_clear` because it is an immutable object.</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #12419 from timfel/fix-fill-funcs</title>
<updated>2018-11-24T22:26:04+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2018-11-24T22:26:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=b47ed76ebfbbd91b5d475eb19043a98e95dc2ad5'/>
<id>b47ed76ebfbbd91b5d475eb19043a98e95dc2ad5</id>
<content type='text'>
Fix PyArray_FillFunc function definitions</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix PyArray_FillFunc function definitions</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Fix PyArray_FillFunc definitions to return an int as per typedef</title>
<updated>2018-11-19T14:22:12+00:00</updated>
<author>
<name>Tim Felgentreff</name>
<email>tim.felgentreff@oracle.com</email>
</author>
<published>2018-11-19T14:18:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=46e9fd95d96fc15b567bf3c324129fe89bdc0713'/>
<id>46e9fd95d96fc15b567bf3c324129fe89bdc0713</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: do not emit compilation warning if using old API</title>
<updated>2018-11-14T22:20:55+00:00</updated>
<author>
<name>mattip</name>
<email>matti.picus@gmail.com</email>
</author>
<published>2018-10-29T18:42:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=e303ad07d591f56c964e9c4dbc358d64b4ae18a1'/>
<id>e303ad07d591f56c964e9c4dbc358d64b4ae18a1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #8955 from eric-wieser/obj-identity</title>
<updated>2018-11-12T17:55:02+00:00</updated>
<author>
<name>Matti Picus</name>
<email>matti.picus@gmail.com</email>
</author>
<published>2018-11-12T17:55:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=e34f5bb4e3aad2bb35fb6d9e3a5c1bfc85eb97eb'/>
<id>e34f5bb4e3aad2bb35fb6d9e3a5c1bfc85eb97eb</id>
<content type='text'>
ENH: Allow ufunc.identity to be any python object</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ENH: Allow ufunc.identity to be any python object</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Allow ufunc.identity to be any python object</title>
<updated>2018-11-12T17:14:50+00:00</updated>
<author>
<name>Eric Wieser</name>
<email>wieser.eric@gmail.com</email>
</author>
<published>2017-04-17T22:41:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=d3b2036949255e48ecbcfcc70ed2ea95c755cf2a'/>
<id>d3b2036949255e48ecbcfcc70ed2ea95c755cf2a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Fix segfault when an error occurs in np.fromfile</title>
<updated>2018-11-10T11:31:52+00:00</updated>
<author>
<name>Simon Gibbons</name>
<email>simongibbons@gmail.com</email>
</author>
<published>2018-11-08T20:16:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=fbdcb5b7b38a7063357f881397ccdc546f46ec5b'/>
<id>fbdcb5b7b38a7063357f881397ccdc546f46ec5b</id>
<content type='text'>
There is a problem with the way in which we handle
errors which occur in the call to `PyArray_FromFile`
in `np.fromfile`.

The problem here is twofold.

 1. The return value isn't checked, therefore if we reach
    the fail block, we will attempt a DECREF on a NULL and
    go down in flames.

 2. The cleanup code on the filepointers (most notabily the
    call to `npy_PyFile_DupClose2`) assumes that there is no
    error set to work.

This PR addresses these issues
 1. By adding a NULL check to the fail block to ensure we don't
    attempt a DECREF on a NULL.

 2. By saving the error state before attempting the cleanup code
    on the file descriptor, and then restoring it after.

Fixes: #12300
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a problem with the way in which we handle
errors which occur in the call to `PyArray_FromFile`
in `np.fromfile`.

The problem here is twofold.

 1. The return value isn't checked, therefore if we reach
    the fail block, we will attempt a DECREF on a NULL and
    go down in flames.

 2. The cleanup code on the filepointers (most notabily the
    call to `npy_PyFile_DupClose2`) assumes that there is no
    error set to work.

This PR addresses these issues
 1. By adding a NULL check to the fail block to ensure we don't
    attempt a DECREF on a NULL.

 2. By saving the error state before attempting the cleanup code
    on the file descriptor, and then restoring it after.

Fixes: #12300
</pre>
</div>
</content>
</entry>
</feed>
