<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/core/_methods.py, branch v1.22.0rc3</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: Fixed an issue wherein `var` would raise for 0d object arrays</title>
<updated>2021-09-09T09:02:07+00:00</updated>
<author>
<name>Bas van Beek</name>
<email>b.f.van.beek@vu.nl</email>
</author>
<published>2021-09-09T09:02:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=4f470b35308d93b44215c6adc22636e1176de6fd'/>
<id>4f470b35308d93b44215c6adc22636e1176de6fd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Use new argument parsing for array creation functions</title>
<updated>2021-03-18T20:37:20+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastian@sipsolutions.net</email>
</author>
<published>2020-12-06T04:38:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=f531110689a646f574ad1529d78b6047cf397f3e'/>
<id>f531110689a646f574ad1529d78b6047cf397f3e</id>
<content type='text'>
The array creation functions have the most to gain:

1. np.asarray is 4 times faster and commonly used.
2. Other functions are wrapped using __array_function__ in Python
   making it more difficult

This commit (unfortunatly) has to do a few things:

* Modify __array_function__ C-side dispatching to accomodate
  the fastcall argument convention.
* Move asarray, etc. to C after removing all "fast paths" from
  np.array (simplifying the code)
* Fixup imports, since asarray was imported directly in a few places
* Replace some places where `np.array` was probably used for speed
  instead of np.asarray or similar. (or by accident in 1 or 2 places)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The array creation functions have the most to gain:

1. np.asarray is 4 times faster and commonly used.
2. Other functions are wrapped using __array_function__ in Python
   making it more difficult

This commit (unfortunatly) has to do a few things:

* Modify __array_function__ C-side dispatching to accomodate
  the fastcall argument convention.
* Move asarray, etc. to C after removing all "fast paths" from
  np.array (simplifying the code)
* Fixup imports, since asarray was imported directly in a few places
* Replace some places where `np.array` was probably used for speed
  instead of np.asarray or similar. (or by accident in 1 or 2 places)
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Fixed ``where`` keyword for ``np.mean`` &amp; ``np.var`` methods (gh-18560)</title>
<updated>2021-03-11T22:59:16+00:00</updated>
<author>
<name>Mateusz Sokół</name>
<email>8431159+mtsokol@users.noreply.github.com</email>
</author>
<published>2021-03-11T22:59:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=c5de5b5c2cf048e1556f31dfcfa031c8f624b98e'/>
<id>c5de5b5c2cf048e1556f31dfcfa031c8f624b98e</id>
<content type='text'>
* Fixed  keyword bug

* Added test case

* Reverted to original notation

* Added tests for var and std

Closes gh-18552</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fixed  keyword bug

* Added test case

* Reverted to original notation

* Added tests for var and std

Closes gh-18552</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Replace `contextlib_nullcontext` with `contextlib.nullcontext`</title>
<updated>2020-12-05T12:22:39+00:00</updated>
<author>
<name>Bas van Beek</name>
<email>b.f.van.beek@vu.nl</email>
</author>
<published>2020-12-05T12:22:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=b2778a8a6d99dfbfee8f09daf6c069d1acf1aa8d'/>
<id>b2778a8a6d99dfbfee8f09daf6c069d1acf1aa8d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Micro-optimize where=True path for mean, var, any, and all</title>
<updated>2020-12-02T20:41:59+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastian@sipsolutions.net</email>
</author>
<published>2020-12-02T18:39:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=755ea9a83e410c226c24b95cb892da3f64248d42'/>
<id>755ea9a83e410c226c24b95cb892da3f64248d42</id>
<content type='text'>
This removes a 20%-30% overhead, and thus the largest chunk of
slowdown incurred by adding the `where` argument. Most other places
have fast-paths for `where=True`, this one also should have it.

The additional argument does slow down the function versions a bit
more than this, but that is to be expected probably (it has to
build a new argument dict, at some point we might want to move this
to C, but that seems worth much more with FASTCALL logic).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes a 20%-30% overhead, and thus the largest chunk of
slowdown incurred by adding the `where` argument. Most other places
have fast-paths for `where=True`, this one also should have it.

The additional argument does slow down the function versions a bit
more than this, but that is to be expected probably (it has to
build a new argument dict, at some point we might want to move this
to C, but that seems worth much more with FASTCALL logic).
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Add where argument to several functions</title>
<updated>2020-07-18T11:10:10+00:00</updated>
<author>
<name>Simon Gasse</name>
<email>sgasse@users.noreply.github.com</email>
</author>
<published>2020-03-26T21:09:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=4ec1dbd8864363f77902d77e3d044a26eead31be'/>
<id>4ec1dbd8864363f77902d77e3d044a26eead31be</id>
<content type='text'>
Harmonize the signature of np.mean, np.var np.std, np.any, np.all,
and their respective nd.array methods with np.sum by adding a where
argument, see gh-15818.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Harmonize the signature of np.mean, np.var np.std, np.any, np.all,
and their respective nd.array methods with np.sum by adding a where
argument, see gh-15818.
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Fix IndexError for illegal axis in np.mean</title>
<updated>2020-03-26T18:21:45+00:00</updated>
<author>
<name>sgasse</name>
<email>sgasse@users.noreply.github.com</email>
</author>
<published>2020-03-25T21:01:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=36dd1b36474d9a6e46c86f708b9a62efa0a7309a'/>
<id>36dd1b36474d9a6e46c86f708b9a62efa0a7309a</id>
<content type='text'>
Catch IndexError in _count_reduce_items used in np.mean and np.var for
illegal axis and reraise as AxisError, see gh-15817.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Catch IndexError in _count_reduce_items used in np.mean and np.var for
illegal axis and reraise as AxisError, see gh-15817.
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Remove non-native byte order from _var check.</title>
<updated>2020-03-11T05:27:24+00:00</updated>
<author>
<name>Ross Barnowski</name>
<email>rossbar@berkeley.edu</email>
</author>
<published>2020-03-11T05:27:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=3d9b25d6b6234aa95ff54c595e02a916056beab8'/>
<id>3d9b25d6b6234aa95ff54c595e02a916056beab8</id>
<content type='text'>
Removes unnecessary code introduced in #15696.

Non-native byte orders were explicitly added to the fast-path
check in _var for complex numbers. However, the non-native
path is unreachable due to coercion in upstream ufuncs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes unnecessary code introduced in #15696.

Non-native byte orders were explicitly added to the fast-path
check in _var for complex numbers. However, the non-native
path is unreachable due to coercion in upstream ufuncs.
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Adds a fast path to var for complex input</title>
<updated>2020-03-09T17:39:08+00:00</updated>
<author>
<name>Ross Barnowski</name>
<email>rossbar@berkeley.edu</email>
</author>
<published>2020-03-03T23:02:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=c898ff3f0338f2b24b8f4e7d1b4fffc36d3e51c9'/>
<id>c898ff3f0338f2b24b8f4e7d1b4fffc36d3e51c9</id>
<content type='text'>
var currently has a conditional that results in conjugate being
called for the variance calculation of complex inputs.

This leg of the computation is slow. This PR avoids this
computational leg for complex inputs via a type check.

Closes #15684
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
var currently has a conditional that results in conjugate being
called for the variance calculation of complex inputs.

This leg of the computation is slow. This PR avoids this
computational leg for complex inputs via a type check.

Closes #15684
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Remove unnecessary 'from __future__ import ...' statements</title>
<updated>2020-01-03T15:48:11+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2019-08-27T11:36:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ed1e9659f103260a32536b4a7615393e3b1173dc'/>
<id>ed1e9659f103260a32536b4a7615393e3b1173dc</id>
<content type='text'>
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
</pre>
</div>
</content>
</entry>
</feed>
