<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/lib, branch with_maskna</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>Merge pull request #290 from mforbes/new-vectorize-clean</title>
<updated>2012-06-12T07:58:30+00:00</updated>
<author>
<name>Travis E. Oliphant</name>
<email>teoliphant@gmail.com</email>
</author>
<published>2012-06-12T07:58:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=c8beafda2251693396794a23601acf167a0e61d5'/>
<id>c8beafda2251693396794a23601acf167a0e61d5</id>
<content type='text'>
ENH: Add kwarg support for vectorize (tickets #2100, #1156, and #1487) (clean)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ENH: Add kwarg support for vectorize (tickets #2100, #1156, and #1487) (clean)</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #306 from nouiz/fill_diagonal</title>
<updated>2012-06-12T07:39:40+00:00</updated>
<author>
<name>Travis E. Oliphant</name>
<email>teoliphant@gmail.com</email>
</author>
<published>2012-06-12T07:39:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=a8f1612c75cc120b6d22896c36a68fea330f5fbe'/>
<id>a8f1612c75cc120b6d22896c36a68fea330f5fbe</id>
<content type='text'>
fix the wrapping problem of fill_diagonal with tall matrix.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix the wrapping problem of fill_diagonal with tall matrix.</pre>
</div>
</content>
</entry>
<entry>
<title>remove unused variables from histogramdd</title>
<updated>2012-06-11T21:07:47+00:00</updated>
<author>
<name>Jake Vanderplas</name>
<email>jakevdp@yahoo.com</email>
</author>
<published>2012-06-11T21:07:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=6cb02660163c107e2cf407c1483bad485fa5fd95'/>
<id>6cb02660163c107e2cf407c1483bad485fa5fd95</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add the warp parameter to fill_diagonal for people that could want the old behavior.</title>
<updated>2012-06-11T20:37:27+00:00</updated>
<author>
<name>Frederic</name>
<email>nouiz@nouiz.org</email>
</author>
<published>2012-06-11T20:37:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=e909e4eafba23b6dd6391c8ea6aeb003c6192ef4'/>
<id>e909e4eafba23b6dd6391c8ea6aeb003c6192ef4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix the wrapping problem of fill_diagonal with tall matrix.</title>
<updated>2012-06-11T20:23:17+00:00</updated>
<author>
<name>Frederic</name>
<email>nouiz@nouiz.org</email>
</author>
<published>2012-06-11T20:23:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=69c33bf74bcdc1d9781bd5db27f942f6d676c032'/>
<id>69c33bf74bcdc1d9781bd5db27f942f6d676c032</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into clean-up-diagonal</title>
<updated>2012-06-06T18:51:10+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2012-06-06T18:51:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=85b682893f1d38cbb3b31f827889e1d54edbc95e'/>
<id>85b682893f1d38cbb3b31f827889e1d54edbc95e</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 kwarg support for vectorize (tickets #2100, #1156, and #1487)</title>
<updated>2012-06-01T00:57:23+00:00</updated>
<author>
<name>Michael McNeil Forbes</name>
<email>michael.forbes+numpy@gmail.com</email>
</author>
<published>2012-04-06T21:52:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=127ae2f54d2c96fc7318fe12a3e2009e517828d1'/>
<id>127ae2f54d2c96fc7318fe12a3e2009e517828d1</id>
<content type='text'>
  This is a substantial rewrite of vectorize to remove all introspection and
  caching behaviour.  This greatly simplifies the logic of the code, and allows
  for much more generalized behaviour, simultaneously fixing tickets #1156,
  #1487, and #2100.  There will probably be a performance hit because caching is
  no longer used (but should be able to be reinstated if needed).
  As vectorize is a convenience function with poor performance in general,
  perhaps this is okay.  Rather than trying to inspect the function to determine
  the number of arguments, defaults, and argument names, we just use the
  arguments passed on the call to determine the behaviour on each call.

  All tests pass and code is fully covered

Fixes:
Ticket #2100: kwarg support for vectorize
- API: Optional excluded argument to exclude some args from vectorization.
- Added documentation, examples, and coverage tests
- Added additional coverage test and base case for functions with no args
- Factored original behaviour into _vectorize_call
- Some minor documentation and error message corrections

Ticket #1156: Support vectorizing over instance methods
- No longer an issue since everything is determined by the call.

Ticket: #1487: result depends on execution order
- No longer caching, so the behaviour is as was expected.

ENH: Simple cache for vectorize

- Added simple cache to prevent vectorize from calling pyfunc twice on the first
  argument when determining the output types and added regression test.
- Added documentation for excluded positional arguments.
- Documentation cleanups.
- Cleaned up variable names.

ENH: Performance improvements for backward compatibility of vectorize.

After some simple profiling, I found that the wrapping used to
support the caching of the previous commit wasted more time than
it saved, so I added a flag to allow the user to toggle.  Moral:
caching makes sense only if the function is expensive and is off
by default.

I also compared performance with the original vectorize and opted
for keeping a cache of _ufunc if otypes is specified and there are
no kwargs/excluded vars.  This case is easy to implement, and allows
users to reproduce (almost) the old performance characteristics if
needed. (The new version is about 5% slower in this case).

It would be much more complicated to add a similar cache in the case
where kwargs are used, and since a wrapper is used here, the
performance gain would be negligible (profiling showed that wrapping
was a more significant slowdown than the extra call to frompyfunc).

- API: Added cache kwarg which allows the user to toggle caching
       of the first result.
- DOC: Added Notes section with a discussion of performance and a
       warning that vectorize should not be used for performance.
- Added private _ufunc member to implement old-style of cache for
  special case with no kwargs, excluded, and with otypes specified.
- Modified test case.

Partially address ticket #1982
- I tried to use hasattr(outputs, '__len__') rather than
  isinstance(outputs, tuple) in order to allow for functions to return
  lists.  This, however, means that strings will get vectorized over
  each character which breaks previous behaviour.  Keeping old
  behaviour for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  This is a substantial rewrite of vectorize to remove all introspection and
  caching behaviour.  This greatly simplifies the logic of the code, and allows
  for much more generalized behaviour, simultaneously fixing tickets #1156,
  #1487, and #2100.  There will probably be a performance hit because caching is
  no longer used (but should be able to be reinstated if needed).
  As vectorize is a convenience function with poor performance in general,
  perhaps this is okay.  Rather than trying to inspect the function to determine
  the number of arguments, defaults, and argument names, we just use the
  arguments passed on the call to determine the behaviour on each call.

  All tests pass and code is fully covered

Fixes:
Ticket #2100: kwarg support for vectorize
- API: Optional excluded argument to exclude some args from vectorization.
- Added documentation, examples, and coverage tests
- Added additional coverage test and base case for functions with no args
- Factored original behaviour into _vectorize_call
- Some minor documentation and error message corrections

Ticket #1156: Support vectorizing over instance methods
- No longer an issue since everything is determined by the call.

Ticket: #1487: result depends on execution order
- No longer caching, so the behaviour is as was expected.

ENH: Simple cache for vectorize

- Added simple cache to prevent vectorize from calling pyfunc twice on the first
  argument when determining the output types and added regression test.
- Added documentation for excluded positional arguments.
- Documentation cleanups.
- Cleaned up variable names.

ENH: Performance improvements for backward compatibility of vectorize.

After some simple profiling, I found that the wrapping used to
support the caching of the previous commit wasted more time than
it saved, so I added a flag to allow the user to toggle.  Moral:
caching makes sense only if the function is expensive and is off
by default.

I also compared performance with the original vectorize and opted
for keeping a cache of _ufunc if otypes is specified and there are
no kwargs/excluded vars.  This case is easy to implement, and allows
users to reproduce (almost) the old performance characteristics if
needed. (The new version is about 5% slower in this case).

It would be much more complicated to add a similar cache in the case
where kwargs are used, and since a wrapper is used here, the
performance gain would be negligible (profiling showed that wrapping
was a more significant slowdown than the extra call to frompyfunc).

- API: Added cache kwarg which allows the user to toggle caching
       of the first result.
- DOC: Added Notes section with a discussion of performance and a
       warning that vectorize should not be used for performance.
- Added private _ufunc member to implement old-style of cache for
  special case with no kwargs, excluded, and with otypes specified.
- Modified test case.

Partially address ticket #1982
- I tried to use hasattr(outputs, '__len__') rather than
  isinstance(outputs, tuple) in order to allow for functions to return
  lists.  This, however, means that strings will get vectorized over
  each character which breaks previous behaviour.  Keeping old
  behaviour for now.
</pre>
</div>
</content>
</entry>
<entry>
<title>REF: simplify extension customization.</title>
<updated>2012-05-31T18:11:14+00:00</updated>
<author>
<name>David Cournapeau</name>
<email>cournape@gmail.com</email>
</author>
<published>2012-05-31T10:26:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=7ec6cf4216abbe3539ce0cca3d53a436c1e6deb5'/>
<id>7ec6cf4216abbe3539ce0cca3d53a436c1e6deb5</id>
<content type='text'>
We are using the new tweak_* bento API wherever possible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are using the new tweak_* bento API wherever possible.
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Changed ipmt to accept array_like arguments.</title>
<updated>2012-05-20T23:46:11+00:00</updated>
<author>
<name>Tim Cera</name>
<email>tim@cerazone.net</email>
</author>
<published>2012-04-29T06:38:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=ebffab2feca24dbd7b503d9b2519f60d6810091b'/>
<id>ebffab2feca24dbd7b503d9b2519f60d6810091b</id>
<content type='text'>
The ipmt function was also fixed to handle broadcasting. The tests
were improved and extended to cover the broadcasting capability.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ipmt function was also fixed to handle broadcasting. The tests
were improved and extended to cover the broadcasting capability.
</pre>
</div>
</content>
</entry>
<entry>
<title>Document the PyArray_Diagonal transition scheme.</title>
<updated>2012-05-16T13:29:34+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2012-05-16T13:29:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=0812564322e1cd282cff489c46a8ce51f7fc2a89'/>
<id>0812564322e1cd282cff489c46a8ce51f7fc2a89</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
