Commit 273d319
authored
Set order='F' when raveling group_idx after broadcast (#286)
* Set order='F' when raveling group_idx after broadcast
This majorly improves the dim=... case for engine="flox" at least.
xref #281
I'm not sure if it is a regression for engine="numpy"
We trade off a single bad reshape for array against argsorting both
array and group_idx for a ~10-20x speedup
```
ds = xr.tutorial.load_dataset('air_temperature')
ds.groupby('lon').count(..., engine="flox")
```
* This is an improvement only for engine=flox
* Update tests
* Fix benchmark
* type ignore1 parent 92f4780 commit 273d319
3 files changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
| 785 | + | |
785 | 786 | | |
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
789 | 790 | | |
790 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
791 | 797 | | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
792 | 801 | | |
793 | 802 | | |
794 | | - | |
| 803 | + | |
795 | 804 | | |
796 | 805 | | |
797 | 806 | | |
| |||
1814 | 1823 | | |
1815 | 1824 | | |
1816 | 1825 | | |
1817 | | - | |
| 1826 | + | |
| 1827 | + | |
1818 | 1828 | | |
1819 | 1829 | | |
1820 | 1830 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
225 | 226 | | |
226 | | - | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
0 commit comments