Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Only convert 0d arrays to scalars in power
Operations such as `x**array([2])` would convert the 2 into an integer and loose the dimension information, because the array (at this time, it is deprecated), supports `__index__` even though it is not 0-d. This fixes it, by not trying the index machinery when it was an array, since it is unnecessary. Closes gh-4145
- Loading branch information
1 parent
e5139b7
commit 27f9354
Showing
2 changed files
with
33 additions
and
19 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