Repository navigation
Commit 2a4aec7
committed
ENH: Raise RuntimeWarning when casting from a unitless
This is a temporary solution to handle numpy#28287.
Rasing `RuntimeWarning` encourages users to pay attention to the behavior.np.timedelta64 to unitful one.1 parent e16fc01 commit 2a4aec7
4 files changed
Lines changed: 23 additions & 9 deletions
File tree
- numpy
- _core
- src/multiarray
- tests
- lib/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
1039 | 1044 | | |
1040 | 1045 | | |
1041 | 1046 | | |
| |||
3903 | 3908 | | |
3904 | 3909 | | |
3905 | 3910 | | |
3906 | | - | |
3907 | | - | |
3908 | | - | |
3909 | 3911 | | |
3910 | 3912 | | |
3911 | 3913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
954 | 959 | | |
955 | | - | |
| 960 | + | |
956 | 961 | | |
957 | | - | |
| 962 | + | |
958 | 963 | | |
959 | 964 | | |
960 | 965 | | |
961 | 966 | | |
962 | 967 | | |
963 | 968 | | |
964 | 969 | | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
965 | 975 | | |
966 | | - | |
| 976 | + | |
967 | 977 | | |
968 | | - | |
| 978 | + | |
969 | 979 | | |
970 | 980 | | |
971 | 981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
0 commit comments