Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Create string dtype instances from the abstract dtype (#22923)
Following up from #22863 (comment), this makes it possible to create string dtype instances from an abstract string DTypeMeta. Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
- Loading branch information
Showing
3 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
String dtype instances can be created from the string abstract dtype classes | ||
---------------------------------------------------------------------------- | ||
It is now possible to create a string dtype instance with a size without | ||
using the string name of the dtype. For example, ``type(np.dtype('U'))(8)`` | ||
will create a dtype that is equivalent to ``np.dtype('U8')``. This feature | ||
is most useful when writing generic code dealing with string dtype | ||
classes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters