<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/doc/source/reference/ufuncs.rst, branch enable_separate_by_default</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>FIX: Transition scheme for safer in-place ufunc operations</title>
<updated>2012-09-20T21:45:00+00:00</updated>
<author>
<name>Nathaniel J. Smith</name>
<email>njs@pobox.com</email>
</author>
<published>2012-09-20T21:03:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=cea0a209875be753a74b8c7bb02aa9531726ee98'/>
<id>cea0a209875be753a74b8c7bb02aa9531726ee98</id>
<content type='text'>
In numpy 1.6 and earlier, if you do
  np.add(int_arr, float_arr, out=int_arr)
or
  int_arr += float_arr
then the result will be silently truncated to integer values. This
often produces bugs, because it's easy to accidentally end up with an
integer array and not realize it.

Therefore, there seems to be consensus that we should switch to using
same_kind casting by default for in-place ufunc operations. However,
just switching this (as was done initially during the 1.7 development
cycle) breaks a lot of code, which is rude and violates our
deprecation policy.

This commit instead adds a special temporary casting rule which acts
like "unsafe", but also checks whether each operation would be allowed
under "same_kind" rules and issues a DeprecationWarning if not.

It also moves NPY_DEFAULT_ASSIGN_CASTING into the formal API instead
of leaving it as a #define. This way we can change it later, and any
code which references it and is compiled against this version of numpy
will automatically switch to whatever we change it too. This avoids
the situation where we want to remove the temporary magic value we're
using to create DeprecationWarnings now, but can't because it would be
an ABI break.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In numpy 1.6 and earlier, if you do
  np.add(int_arr, float_arr, out=int_arr)
or
  int_arr += float_arr
then the result will be silently truncated to integer values. This
often produces bugs, because it's easy to accidentally end up with an
integer array and not realize it.

Therefore, there seems to be consensus that we should switch to using
same_kind casting by default for in-place ufunc operations. However,
just switching this (as was done initially during the 1.7 development
cycle) breaks a lot of code, which is rude and violates our
deprecation policy.

This commit instead adds a special temporary casting rule which acts
like "unsafe", but also checks whether each operation would be allowed
under "same_kind" rules and issues a DeprecationWarning if not.

It also moves NPY_DEFAULT_ASSIGN_CASTING into the formal API instead
of leaving it as a #define. This way we can change it later, and any
code which references it and is compiled against this version of numpy
will automatically switch to whatever we change it too. This avoids
the situation where we want to remove the temporary magic value we're
using to create DeprecationWarnings now, but can't because it would be
an ABI break.
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: Document the ufunc 'where=' parameter and the NpyAuxData C API mechanism</title>
<updated>2011-07-06T22:24:12+00:00</updated>
<author>
<name>Mark Wiebe</name>
<email>mwiebe@enthought.com</email>
</author>
<published>2011-06-29T16:54:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=b48c7c1c7065a5fa12645473d6d288f2f7d81df1'/>
<id>b48c7c1c7065a5fa12645473d6d288f2f7d81df1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: Document the new keyword arguments for ufuncs</title>
<updated>2011-04-22T21:04:33+00:00</updated>
<author>
<name>Mark Wiebe</name>
<email>mwwiebe@gmail.com</email>
</author>
<published>2011-04-13T22:04:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=58b77b2268c36c4617fb7f1f4b1227eb347d2d5b'/>
<id>58b77b2268c36c4617fb7f1f4b1227eb347d2d5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: Improve the documentation about type promotion</title>
<updated>2011-04-22T21:04:33+00:00</updated>
<author>
<name>Mark Wiebe</name>
<email>mwwiebe@gmail.com</email>
</author>
<published>2011-04-13T21:44:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=d97a5e37b2085db9558ff64716e29e6cbf791a4c'/>
<id>d97a5e37b2085db9558ff64716e29e6cbf791a4c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ENH: Rename the half character code from 'j' to 'e'</title>
<updated>2010-12-02T03:02:16+00:00</updated>
<author>
<name>Mark Wiebe</name>
<email>mwwiebe@gmail.com</email>
</author>
<published>2010-11-28T00:45:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=c6f8dbbd240ada8d0edd0527cd218cfc46deec41'/>
<id>c6f8dbbd240ada8d0edd0527cd218cfc46deec41</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: core: Update docs for half/float16 type</title>
<updated>2010-12-02T03:02:15+00:00</updated>
<author>
<name>Mark Wiebe</name>
<email>mwwiebe@gmail.com</email>
</author>
<published>2010-11-11T01:08:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=9b72aa96cec9d182062f378fca869aaa303f1ca9'/>
<id>9b72aa96cec9d182062f378fca869aaa303f1ca9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>second set of checkins from doc editor</title>
<updated>2009-11-13T17:50:02+00:00</updated>
<author>
<name>Jarrod Millman</name>
<email>millman@berkeley.edu</email>
</author>
<published>2009-11-13T17:50:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=6e91f0f59818c5bc9021f1913764bb667811fbcc'/>
<id>6e91f0f59818c5bc9021f1913764bb667811fbcc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DOC: mention nextafter ufunc in the release notes and reference.</title>
<updated>2009-11-04T07:46:10+00:00</updated>
<author>
<name>David Cournapeau</name>
<email>cournape@gmail.com</email>
</author>
<published>2009-11-04T07:46:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=92d3b835091de3ec14b3b0bf4217d8df35f5fbd3'/>
<id>92d3b835091de3ec14b3b0bf4217d8df35f5fbd3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Docstring update: doc/source/reference</title>
<updated>2009-10-02T19:29:38+00:00</updated>
<author>
<name>Pauli Virtanen</name>
<email>pav@iki.fi</email>
</author>
<published>2009-10-02T19:29:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=65cc08216ffcd7a330f7a44991cd46bd0f14aa51'/>
<id>65cc08216ffcd7a330f7a44991cd46bd0f14aa51</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add support for __array_prepare__</title>
<updated>2009-08-23T16:30:28+00:00</updated>
<author>
<name>Darren Dale</name>
<email>dsdale24@gmail.com</email>
</author>
<published>2009-08-23T16:30:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/numpy.git/commit/?id=9e053da77d773fb22ee83219ad5595af6c73c953'/>
<id>9e053da77d773fb22ee83219ad5595af6c73c953</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
