<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/f2py/cb_rules.py, branch eric-wieser-patch-1</title>
<subtitle>github.com: numpy/numpy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/'/>
<entry>
<title>BUG: f2py: fix f2py generated code to work on Pypy</title>
<updated>2018-02-24T21:43:16+00:00</updated>
<author>
<name>Pauli Virtanen</name>
<email>pav@iki.fi</email>
</author>
<published>2018-02-24T21:18:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=3957976a7676c49fc1377539c11cddb2c50f3a0b'/>
<id>3957976a7676c49fc1377539c11cddb2c50f3a0b</id>
<content type='text'>
F2py generates code that uses PyTuple_SetItem on a tuple that has been
"used", which is invalid on Pypy.

Add #ifdefs that make the generated code convert the object to a list,
use PyList_SetItem, and then convert it back to a tuple.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
F2py generates code that uses PyTuple_SetItem on a tuple that has been
"used", which is invalid on Pypy.

Add #ifdefs that make the generated code convert the object to a list,
use PyList_SetItem, and then convert it back to a tuple.
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Fix f2py string variables in callbacks.</title>
<updated>2017-11-15T21:03:37+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2017-11-15T20:53:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=0a1069ae98f49ba7fa87a37fc62f0db904265c2c'/>
<id>0a1069ae98f49ba7fa87a37fc62f0db904265c2c</id>
<content type='text'>
When NPY_CHAR was deprecated and replaced by NPY_STRING in f2py, calls
to PyArray_New that previously relied on the type to get the itemsize
needed the size explicitly specified, but that modification was missed
in some of the code. Because the strings that replacee the 'c' type are
always 'S1', we use an itemsize of 1 for the string types and pass it
explicitly.

Closes #10027.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When NPY_CHAR was deprecated and replaced by NPY_STRING in f2py, calls
to PyArray_New that previously relied on the type to get the itemsize
needed the size explicitly specified, but that modification was missed
in some of the code. Because the strings that replacee the 'c' type are
always 'S1', we use an itemsize of 1 for the string types and pass it
explicitly.

Closes #10027.
</pre>
</div>
</content>
</entry>
<entry>
<title>STY: Break some long lines in numpy/f2py/*.py.</title>
<updated>2015-07-29T20:12:32+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2015-07-29T20:12:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=d676616cb5ddde980734e2b60569a69912983940'/>
<id>d676616cb5ddde980734e2b60569a69912983940</id>
<content type='text'>
The fixes are generated by autopep8, which uses line continuation.
There are 441 cases that it is unable to handle, involving strings, and
that is more, and more delicate, work than I want to do at this time.
The line continuation characters at least mark some of the long lines.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fixes are generated by autopep8, which uses line continuation.
There are 441 cases that it is unable to handle, involving strings, and
that is more, and more delicate, work than I want to do at this time.
The line continuation characters at least mark some of the long lines.
</pre>
</div>
</content>
</entry>
<entry>
<title>STY: Make PEP8 fixes in numpy/f2py</title>
<updated>2015-07-26T05:18:23+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2015-07-26T04:49:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=a0121573e6685f09e5f613280d616070b8ff99cb'/>
<id>a0121573e6685f09e5f613280d616070b8ff99cb</id>
<content type='text'>
Decided to bite the bullet on this one. The code is certainly more
readable, so should be easier to fix if we need to.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Decided to bite the bullet on this one. The code is certainly more
readable, so should be easier to fix if we need to.
</pre>
</div>
</content>
</entry>
<entry>
<title>STY: Make pyflakes fixes in numpy/f2py</title>
<updated>2015-07-26T05:18:23+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2015-07-26T04:38:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=b80d1f979efb528e855263a38b389cebd3eb90e1'/>
<id>b80d1f979efb528e855263a38b389cebd3eb90e1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DEP: Replaced NPY_[F,C]ARRAY with NPY_ARRAY_[F,C]ARRAY</title>
<updated>2014-11-10T16:02:18+00:00</updated>
<author>
<name>Chris Kerr</name>
<email>debdepba@dasganma.tk</email>
</author>
<published>2014-11-10T15:33:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=347c6142d5baa5ba3ea55299ab96fe114ab94c6c'/>
<id>347c6142d5baa5ba3ea55299ab96fe114ab94c6c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DEP: replaced arr-&gt;data with PyArray_DATA</title>
<updated>2014-11-10T14:18:37+00:00</updated>
<author>
<name>Chris Kerr</name>
<email>debdepba@dasganma.tk</email>
</author>
<published>2014-11-10T14:18:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=2129f5c5c0f52d4e428f406e1cbd7ce62bca4af8'/>
<id>2129f5c5c0f52d4e428f406e1cbd7ce62bca4af8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>STY: Giant comma spacing fixup.</title>
<updated>2013-08-18T17:51:25+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-08-18T17:51:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=fbd6510d58a47ea0d166c48a82793f05425406e4'/>
<id>fbd6510d58a47ea0d166c48a82793f05425406e4</id>
<content type='text'>
Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long
and will need to be broken at some point. OTOH, some lines were already
too long and need to be broken at some point. Now seems as good a time
as any to do this with open PRs at a minimum.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long
and will need to be broken at some point. OTOH, some lines were already
too long and need to be broken at some point. Now seems as good a time
as any to do this with open PRs at a minimum.
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Apply 2to3 idioms fixer.</title>
<updated>2013-05-03T03:13:17+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-04-27T03:31:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=dec4f4b76ae9b2b953bcc093275aa59f93adf6fd'/>
<id>dec4f4b76ae9b2b953bcc093275aa59f93adf6fd</id>
<content type='text'>
The idioms fixer makes the following replacements.

1) int &lt;- bool
2) comparison or identity of types &lt;- isinstance
3) a.sort() &lt;- sorted(a)

There were two problems that needed to be dealt with after the
application of the fixer. First, the replacement of comparison or
identity of types by isinstance was not always correct.  The isinstance
function returns true for subtypes whereas many of the places where the
fixer made a substitution needed to check for exact type equality.
Second, the sorted function was applied to arrays, but because it treats
them as iterators and constructs a sorted list from the result, that is
the wrong thing to do.

Closes #3062.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The idioms fixer makes the following replacements.

1) int &lt;- bool
2) comparison or identity of types &lt;- isinstance
3) a.sort() &lt;- sorted(a)

There were two problems that needed to be dealt with after the
application of the fixer. First, the replacement of comparison or
identity of types by isinstance was not always correct.  The isinstance
function returns true for subtypes whereas many of the places where the
fixer made a substitution needed to check for exact type equality.
Second, the sorted function was applied to arrays, but because it treats
them as iterators and constructs a sorted list from the result, that is
the wrong thing to do.

Closes #3062.
</pre>
</div>
</content>
</entry>
<entry>
<title>2to3: Apply types fixer.</title>
<updated>2013-04-14T14:57:45+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-04-13T18:21:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=c879ad8a39f2b74edcdaa05a2f2f854fb235537d'/>
<id>c879ad8a39f2b74edcdaa05a2f2f854fb235537d</id>
<content type='text'>
Python 3 removes the builtin types from the types module. The types
fixer replaces such references with the builtin types where possible
and also takes care of some special cases:

    types.TypeNone           &lt;- type(None)
    types.NotImplementedType &lt;- type(NotImplemented)
    types.EllipsisType       &lt;- type(Ellipsis)

The only two tricky substitutions are

    types.StringType         &lt;- bytes
    types.LongType           &lt;- int

These are fixed up to support both Python 3 and Python 2 code by
importing the long and bytes types from numpy.compat.

Closes #3240.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 3 removes the builtin types from the types module. The types
fixer replaces such references with the builtin types where possible
and also takes care of some special cases:

    types.TypeNone           &lt;- type(None)
    types.NotImplementedType &lt;- type(NotImplemented)
    types.EllipsisType       &lt;- type(Ellipsis)

The only two tricky substitutions are

    types.StringType         &lt;- bytes
    types.LongType           &lt;- int

These are fixed up to support both Python 3 and Python 2 code by
importing the long and bytes types from numpy.compat.

Closes #3240.
</pre>
</div>
</content>
</entry>
</feed>
