Repository navigation
Commit 5accbf6
BUG/TST: Fix numpy#7259, do not "force scalar" for already scalar str/bytes
Fix for numpy#7259. Since commit f8f753b, fill_value was forced scalar by
indexing with [()]. This works for most numpy scalars, but not for U
(str) and S (bytes). This commit falls back to the pre-f8f753b version
when forcing to scalar fails for fill_value of dtypes with kind U and S.
Also add a test to see that this works in practice.1 parent e986bc8 commit 5accbf6
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3530 | 3530 | | |
3531 | 3531 | | |
3532 | 3532 | | |
3533 | | - | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
3534 | 3541 | | |
3535 | 3542 | | |
3536 | 3543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1819 | 1819 | | |
1820 | 1820 | | |
1821 | 1821 | | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
1822 | 1829 | | |
1823 | 1830 | | |
1824 | 1831 | | |
| |||
0 commit comments