Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: adding casting option to numpy.stack. (#21627)
np.concatenate and np.stack are similar methods, but only np.concatenate has the casting option. This PR puts the casting option into the np.stack method to control what kind of data casting may occur Closes gh-20959 * ENH: adding casting option to numpy.stack. See #20959 * ENH: adding dtype option to numpy.stack. See #20959 * REV: removing auto-generated file loops_modulo.dispatch.c See #20959 * REV: removing auto-generated file loops_modulo.dispatch.c See #20959 * REV: removing inserted newlines See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * DOC: inserting versionadded info in dtype and casting parameters. See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * TST: writing tests to stack method with dtype and casting options See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * DOC: adding upcoming_change file for new options casting and dtype in method stack. See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * REV: reverting lint errors. See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * DOC: inserting hstack and vstack methods in upcoming changes See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * ENH: adding dtype and casting keyword arguments to numpy.vstack and numpy.hstack. See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * TST: writing tests to vstack and hstack methods with dtype and casting keyword arguments. See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * REV: reverting the 'out' option type in stack method. See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * REV: Reverting out type changes in overload of shape_base.pyi file. See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: jhonatancunha <jhonatancunha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> * DOC: correcting some english erros in upcoming_changes file. See #20959 Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com> Co-authored-by: JessePires <jessepires2010@gmail.com> Co-authored-by: alescrocaro <alescrocaro@gmail.com> Co-authored-by: JessePires <jesserocha@alunos.utfpr.edu.br> Co-authored-by: patriarka <matheussantanapatriarca2019@outlook.com>
- Loading branch information
1 parent
4a0e507
commit 126046f
Showing
5 changed files
with
164 additions
and
18 deletions.
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
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,16 @@ | ||
``casting`` and ``dtype`` keyword arguments for `numpy.stack` | ||
------------------------------------------------------------- | ||
The ``casting`` and ``dtype`` keyword arguments are now available for `numpy.stack`. | ||
To use them, write ``np.stack(..., dtype=None, casting='same_kind')``. | ||
|
||
|
||
``casting`` and ``dtype`` keyword arguments for `numpy.vstack` | ||
-------------------------------------------------------------- | ||
The ``casting`` and ``dtype`` keyword arguments are now available for `numpy.vstack`. | ||
To use them, write ``np.vstack(..., dtype=None, casting='same_kind')``. | ||
|
||
|
||
``casting`` and ``dtype`` keyword arguments for `numpy.hstack` | ||
-------------------------------------------------------------- | ||
The ``casting`` and ``dtype`` keyword arguments are now available for `numpy.hstack`. | ||
To use them, write ``np.hstack(..., dtype=None, casting='same_kind')``. |
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
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