diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2022-09-20 12:29:38 +0200 |
---|---|---|
committer | Sebastian Berg <sebastianb@nvidia.com> | 2022-09-21 15:04:57 +0200 |
commit | 519ce63b8ef9e3af0688936b3b822a8cbcc123f7 (patch) | |
tree | db0957d81a9d5e0358b20572ad03b3b272fca424 /numpy/array_api/tests/test_array_object.py | |
parent | 2524a53ba30c1207770a27a513eb18a33837a145 (diff) | |
download | numpy-519ce63b8ef9e3af0688936b3b822a8cbcc123f7.tar.gz |
ENH: Allow creating structured void scalars by passing dtype
Adds an optional `dtype=` kwarg to `np.void`. If given (and not None),
this kwarg effectively turns it into:
res = np.array(data, dtype=dtype)[()]
Thanks for Marten's review and Bas' help with the typing.
Reviewed-by: Marten van Kerkwijk <mhvk@astro.utoronto.ca>
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
Diffstat (limited to 'numpy/array_api/tests/test_array_object.py')
0 files changed, 0 insertions, 0 deletions