Commit e7a9c5f
authored
fixes #1764
Adding the comments from the Initial PR
#1855 by @fkiraly
The reason is that `numpy 2` added additional arguments to
`__array_wrap__` which was interacting with
`torch.Tensor.__array_wrap__` or `pandas.Series.__array_wrap__` that did
not have said arguments on earlier versions, in `TorchNormalizer`.
The warning can be avoided by explicit coercion to `torch` prior to
mixed usage - avoiding mixed types across packages entirely.
This also makes the coercions more explicit, enabling future refactors
where we may want to move to more "clean" type assumptions instead of
polymorphic union types.
1 parent cc6a3d7 commit e7a9c5f
1 file changed
+41
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
711 | 733 | | |
712 | 734 | | |
713 | 735 | | |
714 | 736 | | |
715 | | - | |
716 | | - | |
717 | 737 | | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
722 | 753 | | |
723 | 754 | | |
724 | 755 | | |
| |||
761 | 792 | | |
762 | 793 | | |
763 | 794 | | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
764 | 799 | | |
765 | 800 | | |
766 | 801 | | |
| |||
0 commit comments