Repository navigation
Commit b6bc683
ENH: Allow user-dtypes return views on
This uses the fact that if something doesn't define an imag, then conjugate() should be defined as a simple view (similar to .real).
This is a follow-up of a previous PR, where I didn't implement this isn't really backportable.
With this, QuadDType for example does return a view (and a complex new-style dtype can opt out this).
This doesn't yet support for .conjugate() to return a view for complex numbers (which would make a lot of sense and could be added but take a bit more effort).
Co-authored-by: Swayam <[email protected]>.conjugate() (#31264)1 parent 12e16ab commit b6bc683
2 files changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
831 | | - | |
832 | | - | |
| 831 | + | |
| 832 | + | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| |||
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
844 | | - | |
845 | | - | |
| 844 | + | |
846 | 845 | | |
847 | | - | |
| 846 | + | |
848 | 847 | | |
849 | 848 | | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
850 | 852 | | |
851 | 853 | | |
852 | 854 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
| |||
0 commit comments