<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/oldnumeric, 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>BUG: Fix failed import of mlab.</title>
<updated>2013-09-27T17:04:16+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-09-27T17:04:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=7bd52d934e5b72b75d3c599a14fb3899243262b7'/>
<id>7bd52d934e5b72b75d3c599a14fb3899243262b7</id>
<content type='text'>
Fix imports in the numpy/oldnumeric/mlab.py module.  The problem was
that the module used imports of the form

from . import compat

which do not work as '.' is apparently undefined when the module import
is attempted. The fix is ugly, but it works and the oldnumeric module is
going away in 1.9.

Closes #3803.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix imports in the numpy/oldnumeric/mlab.py module.  The problem was
that the module used imports of the form

from . import compat

which do not work as '.' is apparently undefined when the module import
is attempted. The fix is ugly, but it works and the oldnumeric module is
going away in 1.9.

Closes #3803.
</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>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>DEP: Deprecate the oldnumeric and numarray modules.</title>
<updated>2013-06-10T22:30:10+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-06-10T03:44:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=a9a470c841eeb5f0fb2c2ae9639f6c2833f03d00'/>
<id>a9a470c841eeb5f0fb2c2ae9639f6c2833f03d00</id>
<content type='text'>
The numarray and oldnumeric modules are deprecated. This is a bit tricky
as raising a DeprecationWarning on import causes an error when tests are
run. To deal with that, a ModuleDeprecationWarning class is added to
numpy and NoseTester is modified to ignore that warning during testing.

Closes #2905
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The numarray and oldnumeric modules are deprecated. This is a bit tricky
as raising a DeprecationWarning on import causes an error when tests are
run. To deal with that, a ModuleDeprecationWarning class is added to
numpy and NoseTester is modified to ignore that warning during testing.

Closes #2905
</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>
<entry>
<title>Merge pull request #3241 from charris/2to3-apply-nonzero-fixer</title>
<updated>2013-04-14T14:33:29+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-04-14T14:33:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=61c5ac6758d05da6cf49b7247eca850d9db83a7a'/>
<id>61c5ac6758d05da6cf49b7247eca850d9db83a7a</id>
<content type='text'>
2to3: Apply nonzero fixer.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2to3: Apply nonzero fixer.</pre>
</div>
</content>
</entry>
<entry>
<title>2to3: Apply nonzero fixer.</title>
<updated>2013-04-13T17:17:54+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-04-13T17:17:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=54ca3f28ada715a0c84686f74f3b5a7ba4aa2c95'/>
<id>54ca3f28ada715a0c84686f74f3b5a7ba4aa2c95</id>
<content type='text'>
In Python 3 the `__nonzero__` class method is replaced by `__bool__`.
This only affects the MaskedArray class in numpy/oldnumeric/ma.py file
and the simplest solution is to provide both methods. I have my doubts
that the fixed up Python 3 version was correct or even tested, but I
think the current solution should work for as long as oldnumeric stays
in numpy.

Closes #3073.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Python 3 the `__nonzero__` class method is replaced by `__bool__`.
This only affects the MaskedArray class in numpy/oldnumeric/ma.py file
and the simplest solution is to provide both methods. I have my doubts
that the fixed up Python 3 version was correct or even tested, but I
think the current solution should work for as long as oldnumeric stays
in numpy.

Closes #3073.
</pre>
</div>
</content>
</entry>
<entry>
<title>2to3: Apply renames fixer.</title>
<updated>2013-04-13T16:16:40+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2013-04-13T15:36:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ffdad17d0db1d55d39911d637c650ea0acada78b'/>
<id>ffdad17d0db1d55d39911d637c650ea0acada78b</id>
<content type='text'>
Rename sys.maxint to sys.maxsize when the Python version is &gt;= 3.  This
change was made in Python 3 because all integers are 'long' integers and
their maximum value bears no relationship to the C type that int used to
represent. The new sys.maxsize value is the maximum value of Py_ssize_t.
This change has not led to any reported problems since the numpy 1.5
release.

Closes #3082
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename sys.maxint to sys.maxsize when the Python version is &gt;= 3.  This
change was made in Python 3 because all integers are 'long' integers and
their maximum value bears no relationship to the C type that int used to
represent. The new sys.maxsize value is the maximum value of Py_ssize_t.
This change has not led to any reported problems since the numpy 1.5
release.

Closes #3082
</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>
</feed>
