You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This doesn't handle slice objects though so that makes me think we'd want to add something similar to isel too.
What is the behaviour we want? A.sel(x=A.x).equals(A) or A.sel(x=A.x) is A?
Doing the latter will mean changing _to_temp_dataset and _from_temp_dataset which suggests the constraint A._from_temp_dataset(A._to_temp_dataset()) is A? But this seems too strong to me. Do we only want to lazily satisfy an equals constraint rather than an identical constraint?
It seems like we'll want to add such short-circuits in many places (I have not checked all of these): sortby, broadcast, align, reindex (transpose does this now).
The text was updated successfully, but these errors were encountered:
dcherian
changed the title
optimizing xarray operations for lazy array equality
optimizing xarray operations for lazy array equality test
Nov 22, 2019
TLDR: I think we want
A.sel(x=A.x).equals(A)
to pass lazily. It doesn't do so currently.Currently if I do
A.sel(x=A.x)
, this sticks in agetitem
call in the dask graph which breaks our lazy array equality optimization. Here's an exampleQuestions:
Where is the best place to do this? In
sel
orisel
? Both?Sticking the following in
sel
makes the above check returnTrue
which is what we want:This doesn't handle slice objects though so that makes me think we'd want to add something similar to
isel
too.What is the behaviour we want?
A.sel(x=A.x).equals(A)
orA.sel(x=A.x) is A
?Doing the latter will mean changing
_to_temp_dataset
and_from_temp_dataset
which suggests the constraintA._from_temp_dataset(A._to_temp_dataset()) is A
? But this seems too strong to me. Do we only want to lazily satisfy anequals
constraint rather than anidentical
constraint?It seems like we'll want to add such short-circuits in many places (I have not checked all of these):
sortby
,broadcast
,align
,reindex
(transpose
does this now).The text was updated successfully, but these errors were encountered: