BUG: Any dtype should call `square` on `arr ** 2` by MaanasArora · Pull Request #29392 · numpy/numpy

@MaanasArora

… array type except object arrays

@MaanasArora MaanasArora changed the title BUG: Structured dtypes should call square on arr ** 2 BUG: Any dtype should call square on arr ** 2

Jul 17, 2025

seberg

seberg

@MaanasArora

…ast_scalar_power` function

charris pushed a commit to charris/numpy that referenced this pull request

Jul 22, 2025
* BUG: update fast_scalar_power to handle special-case squaring for any array type except object arrays

* BUG: fix missing declaration

* TST: add test to ensure `arr**2` calls square for structured dtypes

* STY: remove whitespace

* BUG: replace new variable `is_square` with direct op comparison in `fast_scalar_power` function

charris added a commit that referenced this pull request

Jul 22, 2025
BUG: Any dtype should call `square` on `arr ** 2` (#29392)

IndifferentArea pushed a commit to IndifferentArea/numpy that referenced this pull request

Dec 7, 2025
* BUG: update fast_scalar_power to handle special-case squaring for any array type except object arrays

* BUG: fix missing declaration

* TST: add test to ensure `arr**2` calls square for structured dtypes

* STY: remove whitespace

* BUG: replace new variable `is_square` with direct op comparison in `fast_scalar_power` function