diff options
author | LeonaTaric <92495067+LeonaTaric@users.noreply.github.com> | 2022-10-19 23:07:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 17:07:39 +0200 |
commit | a8449b52163f871b75a4873a9543db6612d38ccf (patch) | |
tree | bd83ae6595800d1c726a3e3a9d17e64fab7bbe30 /numpy/array_api/_creation_functions.py | |
parent | 527c6e13ae65de08c6d998342b6a836a663c66b4 (diff) | |
download | numpy-a8449b52163f871b75a4873a9543db6612d38ccf.tar.gz |
ENH: unstructured_to_structured converts dtype argument (#22442)
Before:
>>> field = unstructured_to_structured(np.zeros((20, 2)), dtype=[('x', float), ('y', float)]) # failed
>>> field = unstructured_to_structured(np.zeros((20, 2)), dtype=np.dtype([('x', float), ('y', float)])) # success
After:
>>> field = unstructured_to_structured(np.zeros((20, 2)), dtype=[('x', float), ('y', float)]) # success
>>> field = unstructured_to_structured(np.zeros((20, 2)), dtype=np.dtype([('x', float), ('y', float)])) # success
Closes gh-22428
Diffstat (limited to 'numpy/array_api/_creation_functions.py')
0 files changed, 0 insertions, 0 deletions