<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/pint.git/pint/numpy_func.py, branch develop</title>
<subtitle>github.com: hgrecco/pint.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/'/>
<entry>
<title>fix typo</title>
<updated>2021-03-03T01:08:17+00:00</updated>
<author>
<name>Keewis</name>
<email>keewis@posteo.de</email>
</author>
<published>2021-03-03T01:08:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=3a4ee2ef782b549ae2e13a8e1c28360fe2fcc4cb'/>
<id>3a4ee2ef782b549ae2e13a8e1c28360fe2fcc4cb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>provide a default to also work with earlier numpy versions</title>
<updated>2021-03-03T01:03:36+00:00</updated>
<author>
<name>Keewis</name>
<email>keewis@posteo.de</email>
</author>
<published>2021-03-03T01:03:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=74d33843d411ea4108c4121a90724332ba3d5f0c'/>
<id>74d33843d411ea4108c4121a90724332ba3d5f0c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>implement lib.stride_tricks.sliding_window_view</title>
<updated>2021-03-03T00:51:24+00:00</updated>
<author>
<name>Keewis</name>
<email>keewis@posteo.de</email>
</author>
<published>2021-03-03T00:51:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=ef5abc9acc1040d9597ae04727f11893f262e796'/>
<id>ef5abc9acc1040d9597ae04727f11893f262e796</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix numpy.linalg.solve units output.</title>
<updated>2021-02-16T16:14:27+00:00</updated>
<author>
<name>Jules Chéron</name>
<email>jules.cheron@gmail.com</email>
</author>
<published>2021-02-16T16:06:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=146f4f16a6268860e0f27c1e129df0ac341eebb4'/>
<id>146f4f16a6268860e0f27c1e129df0ac341eebb4</id>
<content type='text'>
Update get_op_output_unit with new type invdiv.
It outputs the product of the following units over the first one in the args list.

Update tests with values &amp; np.dot(A, x) == b.
Where x = np.linalg.solve(A, b)

Closes #1246
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update get_op_output_unit with new type invdiv.
It outputs the product of the following units over the first one in the args list.

Update tests with values &amp; np.dot(A, x) == b.
Where x = np.linalg.solve(A, b)

Closes #1246
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge #1224</title>
<updated>2021-01-07T05:28:44+00:00</updated>
<author>
<name>bors[bot]</name>
<email>26634292+bors[bot]@users.noreply.github.com</email>
</author>
<published>2021-01-07T05:28:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=cb3234213b938b74321662bc3732d85a5924f8c2'/>
<id>cb3234213b938b74321662bc3732d85a5924f8c2</id>
<content type='text'>
1224: Updated linter r=hgrecco a=hgrecco

- [x] Closes #1223 (insert issue number)
- [x] Executed ``pre-commit run --all-files`` with no errors
- [ ] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file


Co-authored-by: Hernan &lt;hernan.grecco@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1224: Updated linter r=hgrecco a=hgrecco

- [x] Closes #1223 (insert issue number)
- [x] Executed ``pre-commit run --all-files`` with no errors
- [ ] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file


Co-authored-by: Hernan &lt;hernan.grecco@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Run linter on all files</title>
<updated>2021-01-07T05:25:28+00:00</updated>
<author>
<name>Hernan</name>
<email>hernan.grecco@gmail.com</email>
</author>
<published>2021-01-07T05:25:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=a750205ae10c5c2c0247668279330f10659ed02b'/>
<id>a750205ae10c5c2c0247668279330f10659ed02b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add sign to numpy_func.py</title>
<updated>2020-10-31T13:03:06+00:00</updated>
<author>
<name>Robin Tesse</name>
<email>robin.tesse@ulb.be</email>
</author>
<published>2020-10-31T09:29:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=0fedfcee89100781e4168acf0ef7cfcdbcb01a8a'/>
<id>0fedfcee89100781e4168acf0ef7cfcdbcb01a8a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>use UnitStrippedWarning to warn about stripped units</title>
<updated>2020-06-20T00:01:29+00:00</updated>
<author>
<name>Keewis</name>
<email>keewis@posteo.de</email>
</author>
<published>2020-06-20T00:01:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=ef0ec9f2e3bbe1c4337683fabda4741cd75fd705'/>
<id>ef0ec9f2e3bbe1c4337683fabda4741cd75fd705</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge #1120</title>
<updated>2020-06-18T20:23:43+00:00</updated>
<author>
<name>bors[bot]</name>
<email>26634292+bors[bot]@users.noreply.github.com</email>
</author>
<published>2020-06-18T20:23:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=2a07e98e345b04f24fbb27d38ad62975b6b4dc78'/>
<id>2a07e98e345b04f24fbb27d38ad62975b6b4dc78</id>
<content type='text'>
1120: revise the unit computation for np.prod r=hgrecco a=keewis

#1087 left out the case where `axis` and `where` are specified and also used the size of the result to compute the output unit if only `axis` was specified. This changes that to use `a.shape[axis]` instead and also implements the support for both `axis` and `where` by broadcasting `where` against the array, applying `np.sum` along `axis` and using the only one unique value (`0` doesn't count) as an exponent. In case there's more than that, it will try to cast to `dimensionless`.

I'm not quite sure if using `np.broadcast_arrays` is the best way to get the exponents, though.

Edit: **Todo**: make the error message easier to understand

- [x] Closes #867
- [x] Executed ``black -t py36 . &amp;&amp; isort -rc . &amp;&amp; flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file


Co-authored-by: Keewis &lt;keewis@posteo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1120: revise the unit computation for np.prod r=hgrecco a=keewis

#1087 left out the case where `axis` and `where` are specified and also used the size of the result to compute the output unit if only `axis` was specified. This changes that to use `a.shape[axis]` instead and also implements the support for both `axis` and `where` by broadcasting `where` against the array, applying `np.sum` along `axis` and using the only one unique value (`0` doesn't count) as an exponent. In case there's more than that, it will try to cast to `dimensionless`.

I'm not quite sure if using `np.broadcast_arrays` is the best way to get the exponents, though.

Edit: **Todo**: make the error message easier to understand

- [x] Closes #867
- [x] Executed ``black -t py36 . &amp;&amp; isort -rc . &amp;&amp; flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file


Co-authored-by: Keewis &lt;keewis@posteo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>implement the case of axis *and* where</title>
<updated>2020-06-18T12:18:09+00:00</updated>
<author>
<name>Keewis</name>
<email>keewis@posteo.de</email>
</author>
<published>2020-06-18T12:18:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/pint.git/commit/?id=7365efaab214a6a7614e93c753daa12bb1ec0959'/>
<id>7365efaab214a6a7614e93c753daa12bb1ec0959</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
