Commit 9049acc
committed
BUG: fix __setitem__ for invalid dtype combinations
Do not allow e.g.
>>> a = xp.asarray([1, 2, 3])
>>> a[0] = 3.5 # cannot type-promote a float scalar and an int array
>>> a[0] = xp.asarray(3.5) # cannot integer and float arrays cannot be promoted together1 parent acfab08 commit 9049acc
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
942 | 942 | | |
943 | 943 | | |
944 | 944 | | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
945 | 954 | | |
946 | 955 | | |
947 | 956 | | |
| |||
0 commit comments