<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/ma/testutils.py, branch v1.22.0rc2</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>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>MAINT: Conversion of some strings to fstrings, part III (#17623)</title>
<updated>2020-10-25T18:47:15+00:00</updated>
<author>
<name>jakobjakobson13</name>
<email>43045863+jakobjakobson13@users.noreply.github.com</email>
</author>
<published>2020-10-25T18:47:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ca39060bd4f98657139f782ff9c02a1f095ed3dc'/>
<id>ca39060bd4f98657139f782ff9c02a1f095ed3dc</id>
<content type='text'>
* Conversion of some strings to fstrings

* Remove spaces

* Update numpy/ma/mrecords.py

Co-authored-by: Bas van Beek &lt;43369155+BvB93@users.noreply.github.com&gt;

* Update numpy/ma/tests/test_old_ma.py

Co-authored-by: Bas van Beek &lt;43369155+BvB93@users.noreply.github.com&gt;

* Update numpy/ma/timer_comparison.py

Co-authored-by: Bas van Beek &lt;43369155+BvB93@users.noreply.github.com&gt;

Co-authored-by: Jakob &lt;jakobjakobson13@posteo.de&gt;
Co-authored-by: Bas van Beek &lt;43369155+BvB93@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Conversion of some strings to fstrings

* Remove spaces

* Update numpy/ma/mrecords.py

Co-authored-by: Bas van Beek &lt;43369155+BvB93@users.noreply.github.com&gt;

* Update numpy/ma/tests/test_old_ma.py

Co-authored-by: Bas van Beek &lt;43369155+BvB93@users.noreply.github.com&gt;

* Update numpy/ma/timer_comparison.py

Co-authored-by: Bas van Beek &lt;43369155+BvB93@users.noreply.github.com&gt;

Co-authored-by: Jakob &lt;jakobjakobson13@posteo.de&gt;
Co-authored-by: Bas van Beek &lt;43369155+BvB93@users.noreply.github.com&gt;</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>
<entry>
<title>MAINT: Remove all uses of run_module_suite.</title>
<updated>2018-04-07T00:20:56+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2018-04-04T16:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=7bf0564f87511d9e7b6287b3eec0857d0d7742df'/>
<id>7bf0564f87511d9e7b6287b3eec0857d0d7742df</id>
<content type='text'>
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Remove use of unittest in NumPy tests.</title>
<updated>2018-03-21T18:38:14+00:00</updated>
<author>
<name>xoviat</name>
<email>xoviat@users.noreply.github.com</email>
</author>
<published>2018-02-28T23:59:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ed6c0dd342c7d6def2600db00c3eaf75e16a39d2'/>
<id>ed6c0dd342c7d6def2600db00c3eaf75e16a39d2</id>
<content type='text'>
This removes a few left over uses of unittest. The main changes apart
from removal of Test case are:

* `setUp` replaced by nose and pytest compatible `setup`
* `tearDown` replaced by nose and pytest compatible `teardown`
* `assertRaises` replaced by `assert_raises`
* `assertEqual` replaced by `assert_equal`

The last two are in `numpy/testings/tests/test_utils.py`, so may seem a
but circular, but at least are limited to those two functions.

The use of `setup` and `teardown`, can be fixed up with the pytest
equivalents after we have switched to pytest.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes a few left over uses of unittest. The main changes apart
from removal of Test case are:

* `setUp` replaced by nose and pytest compatible `setup`
* `tearDown` replaced by nose and pytest compatible `teardown`
* `assertRaises` replaced by `assert_raises`
* `assertEqual` replaced by `assert_equal`

The last two are in `numpy/testings/tests/test_utils.py`, so may seem a
but circular, but at least are limited to those two functions.

The use of `setup` and `teardown`, can be fixed up with the pytest
equivalents after we have switched to pytest.
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Rearrange files in numpy/testing module.</title>
<updated>2017-07-05T01:51:58+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2017-07-04T19:47:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ae84af3b6e6d96e4be408e8a56408290ee1879db'/>
<id>ae84af3b6e6d96e4be408e8a56408290ee1879db</id>
<content type='text'>
The aim here is to separate out the nose dependent files prior to adding
pytest support. This could be done by adding new files to the general
numpy/testing directory, but I felt that it was to have the relevant
files separated out as it makes it easier to completely remove nose
dependencies when needed.

Many places were accessing submodules in numpy/testing directly, and in
some cases incorrectly. That presented a backwards compatibility
problem. The solution adapted here is to have "dummy" files whose
contents will depend on whether of not pytest is active. That way the
module looks the same as before from the outside.

In the case of numpy itself, direct accesses have been fixed. Having
proper `__all__` lists in the submodules helped in that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The aim here is to separate out the nose dependent files prior to adding
pytest support. This could be done by adding new files to the general
numpy/testing directory, but I felt that it was to have the relevant
files separated out as it makes it easier to completely remove nose
dependencies when needed.

Many places were accessing submodules in numpy/testing directly, and in
some cases incorrectly. That presented a backwards compatibility
problem. The solution adapted here is to have "dummy" files whose
contents will depend on whether of not pytest is active. That way the
module looks the same as before from the outside.

In the case of numpy itself, direct accesses have been fixed. Having
proper `__all__` lists in the submodules helped in that.
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Remove warning NaT filter from masked array test utils</title>
<updated>2017-05-07T14:21:30+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastian@sipsolutions.net</email>
</author>
<published>2017-05-07T14:06:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=ca05d523c3d022eba8ea1bf75b50c60550d30d5a'/>
<id>ca05d523c3d022eba8ea1bf75b50c60550d30d5a</id>
<content type='text'>
This may show warnings in downstream projects, which should likely
not be there. We could also drop in the normal assert_equal there,
which would support NaT, and NaN, but checks for scalarness, which
this currently does not (which also could create problems).

Works around the only test with this problem, by using the normal
assert_equal there.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This may show warnings in downstream projects, which should likely
not be there. We could also drop in the normal assert_equal there,
which would support NaT, and NaN, but checks for scalarness, which
this currently does not (which also could create problems).

Works around the only test with this problem, by using the normal
assert_equal there.
</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Suppress common NaT warnings</title>
<updated>2016-09-02T08:10:55+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastian@sipsolutions.net</email>
</author>
<published>2016-06-19T11:39:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=86b0a5e9c58160bad818ba3a0a6faf38f5ac4d09'/>
<id>86b0a5e9c58160bad818ba3a0a6faf38f5ac4d09</id>
<content type='text'>
Printing of datetime arrays used to cause warning due to
comparison warnings in NaT. This is circumvented by using views
to integer values. Part of this should be simplified when
the deprecation is over.

Also fixes a bug with non-native byteorder.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Printing of datetime arrays used to cause warning due to
comparison warnings in NaT. This is circumvented by using views
to integer values. Part of this should be simplified when
the deprecation is over.

Also fixes a bug with non-native byteorder.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Merge pull request #7001 from shoyer/NaT-comparison"</title>
<updated>2016-01-17T02:06:00+00:00</updated>
<author>
<name>Charles Harris</name>
<email>charlesr.harris@gmail.com</email>
</author>
<published>2016-01-17T02:00:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=e0cb3f79936656d6d2f48cbad46a3a9f2bad5ae1'/>
<id>e0cb3f79936656d6d2f48cbad46a3a9f2bad5ae1</id>
<content type='text'>
This reverts commit 7141f40b58ed1e7071cde78ab7bc8ab37e9c5983,
reversing changes made to 8fa6e3bef26a6d4a2c92f2824129aa4409be2590.

The original broke some pandas tests. The current plan to get this
in is

* reversion
* issue FutureWarning in 1.11 and 1.12
* make the change in 1.13.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 7141f40b58ed1e7071cde78ab7bc8ab37e9c5983,
reversing changes made to 8fa6e3bef26a6d4a2c92f2824129aa4409be2590.

The original broke some pandas tests. The current plan to get this
in is

* reversion
* issue FutureWarning in 1.11 and 1.12
* make the change in 1.13.
</pre>
</div>
</content>
</entry>
<entry>
<title>TST, ENH: make all comparisons with NaT false</title>
<updated>2016-01-14T21:44:43+00:00</updated>
<author>
<name>Stephan Hoyer</name>
<email>shoyer@climate.com</email>
</author>
<published>2016-01-13T04:44:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=53ad26a84ac2aa6f5a37f09aa9feae5afed44f79'/>
<id>53ad26a84ac2aa6f5a37f09aa9feae5afed44f79</id>
<content type='text'>
Now, NaT compares like NaN:
- NaT != NaT -&gt; True
- NaT == NaT (and all other comparisons) -&gt; False

We discussed this on the mailing list back in October:
https://mail.scipy.org/pipermail/numpy-discussion/2015-October/073968.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now, NaT compares like NaN:
- NaT != NaT -&gt; True
- NaT == NaT (and all other comparisons) -&gt; False

We discussed this on the mailing list back in October:
https://mail.scipy.org/pipermail/numpy-discussion/2015-October/073968.html
</pre>
</div>
</content>
</entry>
</feed>
