<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/numpy.git/numpy/lib/_iotools.py, branch treddy_issue_18273</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>MAINT: Minor touchups in npyio (#17796)</title>
<updated>2020-11-19T06:56:16+00:00</updated>
<author>
<name>Ross Barnowski</name>
<email>rossbar@berkeley.edu</email>
</author>
<published>2020-11-19T06:56:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=b88b2c0c19851810d4ee07f03a7734b6e19dbdaa'/>
<id>b88b2c0c19851810d4ee07f03a7734b6e19dbdaa</id>
<content type='text'>
* Simplify logic for encoding kwarg in _decode_line.

* Remove unnecessary else branch from split_line.

* MAINT: rm else branch from loadtxt.

* MAINT: re-nest encoding parsing.

Co-Authored-By: mattip &lt;matti.picus@gmail.com&gt;

* condense return statement.

Co-authored-by: mattip &lt;matti.picus@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Simplify logic for encoding kwarg in _decode_line.

* Remove unnecessary else branch from split_line.

* MAINT: rm else branch from loadtxt.

* MAINT: re-nest encoding parsing.

Co-Authored-By: mattip &lt;matti.picus@gmail.com&gt;

* condense return statement.

Co-authored-by: mattip &lt;matti.picus@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Remove users of `numpy.compat.bytes`</title>
<updated>2020-08-31T09:23:54+00:00</updated>
<author>
<name>Eric Wieser</name>
<email>wieser.eric@gmail.com</email>
</author>
<published>2020-08-31T09:23:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=8a4fafa5278c2d894cf4efd40a342b33e941e373'/>
<id>8a4fafa5278c2d894cf4efd40a342b33e941e373</id>
<content type='text'>
Some more Python 2 cleanup.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some more Python 2 cleanup.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update numpy/lib/_iotools.py</title>
<updated>2020-05-18T21:50:58+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastian@sipsolutions.net</email>
</author>
<published>2020-05-18T21:50:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=4b401344f6bc93a466faf4f88264608a06c43cb9'/>
<id>4b401344f6bc93a466faf4f88264608a06c43cb9</id>
<content type='text'>
Co-authored-by: Eric Wieser &lt;wieser.eric@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Eric Wieser &lt;wieser.eric@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>BUG: Fix default fallback in genfromtxt</title>
<updated>2020-05-18T21:44:26+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastian@sipsolutions.net</email>
</author>
<published>2020-05-14T20:55:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=8bc4701bbfbcfafb2be634d41a2611bd0182d344'/>
<id>8bc4701bbfbcfafb2be634d41a2611bd0182d344</id>
<content type='text'>
This affected (for example?) if the `dtype=object` was used
without a converter, meaning that the default one is used.
And this is currently the last one, which is `string_` (and thus
bytes).

Closes gh-16189
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This affected (for example?) if the `dtype=object` was used
without a converter, meaning that the default one is used.
And this is currently the last one, which is `string_` (and thus
bytes).

Closes gh-16189
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Extract a helper function from StringConverter</title>
<updated>2020-05-08T08:46:22+00:00</updated>
<author>
<name>Eric Wieser</name>
<email>wieser.eric@gmail.com</email>
</author>
<published>2020-05-08T08:43:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=fc89a21ac71dd7f744ecb07fa45239d71bc00704'/>
<id>fc89a21ac71dd7f744ecb07fa45239d71bc00704</id>
<content type='text'>
The previous logic here was very hard to follow, as loop variables were being used after the loop ended, and being conditionally overwritten.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous logic here was very hard to follow, as loop variables were being used after the loop ended, and being conditionally overwritten.
</pre>
</div>
</content>
</entry>
<entry>
<title>STY: remove some parens in iteration</title>
<updated>2020-05-08T08:23:35+00:00</updated>
<author>
<name>Eric Wieser</name>
<email>wieser.eric@gmail.com</email>
</author>
<published>2020-05-08T08:23:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=e499615c036871d42b09c96312ca0dd2da1b25c0'/>
<id>e499615c036871d42b09c96312ca0dd2da1b25c0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: remove unused private members</title>
<updated>2020-05-08T08:20:04+00:00</updated>
<author>
<name>Eric Wieser</name>
<email>wieser.eric@gmail.com</email>
</author>
<published>2020-05-08T08:20:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=5d6763496f6214c4a3240d3894328adf0e4cbebc'/>
<id>5d6763496f6214c4a3240d3894328adf0e4cbebc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>STY: Remove some weird comments from iotools</title>
<updated>2020-05-08T08:06:49+00:00</updated>
<author>
<name>Eric Wieser</name>
<email>wieser.eric@gmail.com</email>
</author>
<published>2020-05-08T08:06:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=3c782b9156a9d2d7159accc6bb9d8e6f4d0108b5'/>
<id>3c782b9156a9d2d7159accc6bb9d8e6f4d0108b5</id>
<content type='text'>
Also fix the docstring indentation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also fix the docstring indentation
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINT: Remove duplicated code in iotools.py</title>
<updated>2020-03-31T18:45:58+00:00</updated>
<author>
<name>Eric Wieser</name>
<email>wieser.eric@gmail.com</email>
</author>
<published>2020-03-31T18:45:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=37214699e18b55b51a3cda5fcaf64ba31c32990c'/>
<id>37214699e18b55b51a3cda5fcaf64ba31c32990c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DEP: Do not allow "abstract" dtype conversion/creation</title>
<updated>2020-02-07T04:10:40+00:00</updated>
<author>
<name>Sebastian Berg</name>
<email>sebastian@sipsolutions.net</email>
</author>
<published>2020-02-04T00:17:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/numpy.git/commit/?id=1a1611a33cfb5ea50d16d20affa5c6fa03e148d7'/>
<id>1a1611a33cfb5ea50d16d20affa5c6fa03e148d7</id>
<content type='text'>
These dtypes do not really make sense as instances. We can (somewhat)
reasonably define np.dtype(np.int64) as the default (machine endianess)
int64. (Arguably, it is unclear that `np.array(arr_of_&gt;f8, dtype="f")`
should return arr_of_&lt;f8, but that would be very noisy!)

However, `np.integer` as equivalent to long, is not well defined.
Similarly, `dtype=Decimal` may be neat to spell `dtype=object` when you
intend to put Decimal objects into the array. But it is misleading,
since there is no special meaning to it at this time.

The biggest issue with it, is that `arr.astype(np.floating)` looks
like it will let float32 or float128 pass, but it will force a
float64 output! Arguably downcasting is a bug in this case.

A related issue is `np.dtype("S")` and especially "S0". The dtype "S"
does make sense for most or all places where `dtype=...` can be
passed. However, it is conceptionally different from other dtypes, since
it will not end up being attached to the array (unlike "S2" which
would be). The dtype "S" really means the type number/DType class
of String, and not a specific dtype instance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These dtypes do not really make sense as instances. We can (somewhat)
reasonably define np.dtype(np.int64) as the default (machine endianess)
int64. (Arguably, it is unclear that `np.array(arr_of_&gt;f8, dtype="f")`
should return arr_of_&lt;f8, but that would be very noisy!)

However, `np.integer` as equivalent to long, is not well defined.
Similarly, `dtype=Decimal` may be neat to spell `dtype=object` when you
intend to put Decimal objects into the array. But it is misleading,
since there is no special meaning to it at this time.

The biggest issue with it, is that `arr.astype(np.floating)` looks
like it will let float32 or float128 pass, but it will force a
float64 output! Arguably downcasting is a bug in this case.

A related issue is `np.dtype("S")` and especially "S0". The dtype "S"
does make sense for most or all places where `dtype=...` can be
passed. However, it is conceptionally different from other dtypes, since
it will not end up being attached to the array (unlike "S2" which
would be). The dtype "S" really means the type number/DType class
of String, and not a specific dtype instance.
</pre>
</div>
</content>
</entry>
</feed>
