<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/matrixlib, branch maintenance/1.8.x</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>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>STY: Giant whitespace cleanup.</title>
<updated>2013-08-18T17:20:45+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-08-18T17:16:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=8ddb0ce0acafe75d78df528b4d2540dfbf4b364d'/>
<id>8ddb0ce0acafe75d78df528b4d2540dfbf4b364d</id>
<content type='text'>
Now is as good a time as any with open PR's at a low.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now is as good a time as any with open PR's at a low.
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: add quickselect algorithm and expose it via partition</title>
<updated>2013-08-12T12:25:52+00:00</updated>
<author>
<name>Julian Taylor</name>
<email>jtaylor.debian@googlemail.com</email>
</author>
<published>2013-05-18T05:45:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=9c4c1c432b27f67eee2ad22ff5f2f9833bd1516d'/>
<id>9c4c1c432b27f67eee2ad22ff5f2f9833bd1516d</id>
<content type='text'>
A partition sorts the kth element into its sorted order and moves all
smaller elements before the kth element and all equal or greater
elements behind it.
The ordering of all elements in the partitions is undefined.

It is implemented via the introselection algorithm which has worst case
linear complexity compared to a full sort that has linearithmic
complexity.
The introselect algorithm uses a quickselect with median of three pivot
and falls back to a quickselect with median of median of five pivot if
no sufficient progress is made.

The pivots used during the search for the wanted kth element can
optionally be stored and reused for further partitionings of the array.
This is used by the python interface if an array of kth is provided to
the partitions function. This improves the performance of median and
which need to select two elements if the size of the array is even. A
percentile function interpolating between values also profits from this.

String selection is implemented in terms of quicksort which has the same
properties as a selection for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A partition sorts the kth element into its sorted order and moves all
smaller elements before the kth element and all equal or greater
elements behind it.
The ordering of all elements in the partitions is undefined.

It is implemented via the introselection algorithm which has worst case
linear complexity compared to a full sort that has linearithmic
complexity.
The introselect algorithm uses a quickselect with median of three pivot
and falls back to a quickselect with median of median of five pivot if
no sufficient progress is made.

The pivots used during the search for the wanted kth element can
optionally be stored and reused for further partitionings of the array.
This is used by the python interface if an array of kth is provided to
the partitions function. This improves the performance of median and
which need to select two elements if the size of the array is even. A
percentile function interpolating between values also profits from this.

String selection is implemented in terms of quicksort which has the same
properties as a selection for now.
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Fix SyntaxError when matrix() is called with invalid string</title>
<updated>2013-05-29T13:35:45+00:00</updated>
<author>
<name>Leon Weber</name>
<email>leon@leonweber.de</email>
</author>
<published>2013-05-23T17:24:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=fc4ade26312bd66474834aa0bee42265e7e15353'/>
<id>fc4ade26312bd66474834aa0bee42265e7e15353</id>
<content type='text'>
The numpy.matrix constructor uses eval(str.translate(table)) to convert
input strings to numeric matrix contents. str.translate(table) will
return empty string if str consists only of invalid characters, causing
SyntaxError in eval(). This is confusing, as one would expect an
exception like TypeError when trying to construct a matrix from invalid
input.

This fix makes sure eval() is only called if str is not empty and
TypeError is raised otherwise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The numpy.matrix constructor uses eval(str.translate(table)) to convert
input strings to numeric matrix contents. str.translate(table) will
return empty string if str consists only of invalid characters, causing
SyntaxError in eval(). This is confusing, as one would expect an
exception like TypeError when trying to construct a matrix from invalid
input.

This fix makes sure eval() is only called if str is not empty and
TypeError is raised otherwise.
</pre>
</div>
</content>
</entry>
<entry>
<title>2to3: Apply `map` fixer.</title>
<updated>2013-04-10T22:41:13+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-04-09T18:44:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=a6164794a63215e23fa28432d9acec4727c68d02'/>
<id>a6164794a63215e23fa28432d9acec4727c68d02</id>
<content type='text'>
In Python 3 `map` is an iterator while in Python 2 it returns a list.
The simple fix applied by the fixer is to inclose all instances of map
with `list(...)`. This is not needed in all cases, and even where
appropriate list comprehensions may be preferred for their clarity.
Consequently, this patch attempts to use list comprehensions where it
makes sense.

When the mapped function has two arguments there is another problem that
can arise. In Python 3 map stops execution when the shortest argument
list is exhausted, while in Python 2 it stops when the longest argument
list is exhausted. Consequently the two argument case might need special
care. However, we have been running Python3 converted versions of numpy
since 1.5 without problems, so it is probably not something that affects
us.

Closes #3068
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Python 3 `map` is an iterator while in Python 2 it returns a list.
The simple fix applied by the fixer is to inclose all instances of map
with `list(...)`. This is not needed in all cases, and even where
appropriate list comprehensions may be preferred for their clarity.
Consequently, this patch attempts to use list comprehensions where it
makes sense.

When the mapped function has two arguments there is another problem that
can arise. In Python 3 map stops execution when the shortest argument
list is exhausted, while in Python 2 it stops when the longest argument
list is exhausted. Consequently the two argument case might need special
care. However, we have been running Python3 converted versions of numpy
since 1.5 without problems, so it is probably not something that affects
us.

Closes #3068
</pre>
</div>
</content>
</entry>
<entry>
<title>2to3: Apply `print` fixer.</title>
<updated>2013-04-06T19:25:26+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-04-06T19:25:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=bb726ca19f434f5055c0efceefe48d89469fcbbe'/>
<id>bb726ca19f434f5055c0efceefe48d89469fcbbe</id>
<content type='text'>
Add `print_function` to all `from __future__ import ...` statements
and use the python3 print function syntax everywhere.

Closes #3078.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `print_function` to all `from __future__ import ...` statements
and use the python3 print function syntax everywhere.

Closes #3078.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #460 from endolith/regex_formatting</title>
<updated>2013-04-03T23:02:33+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-04-03T23:02:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ca77e31947b74feded3d69a282e638fa2e9ebf7c'/>
<id>ca77e31947b74feded3d69a282e638fa2e9ebf7c</id>
<content type='text'>
DOC: Formatting fixes using regex</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DOC: Formatting fixes using regex</pre>
</div>
</content>
</entry>
<entry>
<title>2to3: Use absolute imports.</title>
<updated>2013-03-28T14:43:26+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-03-28T03:49:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=d4b88c1dbd6898fb6fcebc97f36b421999340f71'/>
<id>d4b88c1dbd6898fb6fcebc97f36b421999340f71</id>
<content type='text'>
The new import `absolute_import` is added the `from __future__ import`
statement and The 2to3 `import` fixer is run to make the imports
compatible. There are several things that need to be dealt with to make
this work.

1) Files meant to be run as scripts run in a different environment than
files imported as part of a package, and so changes to those files need
to be skipped. The affected script files are:

    * all setup.py files
    * numpy/core/code_generators/generate_umath.py
    * numpy/core/code_generators/generate_numpy_api.py
    * numpy/core/code_generators/generate_ufunc_api.py

2) Some imported modules are not available as they are created during
the build process and consequently 2to3 is unable to handle them
correctly. Files that import those modules need a bit of extra work.
The affected files are:

    * core/__init__.py,
    * core/numeric.py,
    * core/_internal.py,
    * core/arrayprint.py,
    * core/fromnumeric.py,
    * numpy/__init__.py,
    * lib/npyio.py,
    * lib/function_base.py,
    * fft/fftpack.py,
    * random/__init__.py

Closes #3172
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new import `absolute_import` is added the `from __future__ import`
statement and The 2to3 `import` fixer is run to make the imports
compatible. There are several things that need to be dealt with to make
this work.

1) Files meant to be run as scripts run in a different environment than
files imported as part of a package, and so changes to those files need
to be skipped. The affected script files are:

    * all setup.py files
    * numpy/core/code_generators/generate_umath.py
    * numpy/core/code_generators/generate_numpy_api.py
    * numpy/core/code_generators/generate_ufunc_api.py

2) Some imported modules are not available as they are created during
the build process and consequently 2to3 is unable to handle them
correctly. Files that import those modules need a bit of extra work.
The affected files are:

    * core/__init__.py,
    * core/numeric.py,
    * core/_internal.py,
    * core/arrayprint.py,
    * core/fromnumeric.py,
    * numpy/__init__.py,
    * lib/npyio.py,
    * lib/function_base.py,
    * fft/fftpack.py,
    * random/__init__.py

Closes #3172
</pre>
</div>
</content>
</entry>
<entry>
<title>2to3: Replace xrange by range and use list(range(...)) where needed</title>
<updated>2013-03-28T00:42:34+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-03-06T04:43:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=91aa03f4a1065319e85c6ee90306971c301fd58c'/>
<id>91aa03f4a1065319e85c6ee90306971c301fd58c</id>
<content type='text'>
In python3 range is an iterator and `xrange` has been removed. This has
two consequence for code:

    1) Where a list is needed `list(range(...))` must be used.
    2) `xrange` must be replaced by `range`

Both of these changes also work in python2 and this patch makes both.

There are three places fixed that do not need it, but I left them in
so that the result would be `xrange` clean.

Closes #3092
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In python3 range is an iterator and `xrange` has been removed. This has
two consequence for code:

    1) Where a list is needed `list(range(...))` must be used.
    2) `xrange` must be replaced by `range`

Both of these changes also work in python2 and this patch makes both.

There are three places fixed that do not need it, but I left them in
so that the result would be `xrange` clean.

Closes #3092
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: Used regex to find colons missing spaces which render wrong online, also other spacing or formatting mistakes</title>
<updated>2013-03-20T00:15:28+00:00</updated>
<author>
<name>endolith</name>
<email>endolith@gmail.com</email>
</author>
<published>2012-09-25T17:41:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=653a6fd443c237842d7a7069d929fb2892dbfe85'/>
<id>653a6fd443c237842d7a7069d929fb2892dbfe85</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
