Skip to content

Lazy look up table in a custom backend #7271

Answered by keewis
mraspaud asked this question in Q&A
Discussion options

You must be logged in to vote

my initial guess would be that this is due to a typo in your code:

def decode_lut(var, lut):
    dtype = lut.dtype
    dims, data, attrs, encoding = unpack_for_decoding(var)
    transform = partial(decode_lut, lut=lut)
    return xr.Variable(dims, lazy_elemwise_func(data, transform, dtype), attrs, encoding)

where the partial should wrap apply_lut instead of decode_lut.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mraspaud
Comment options

@mraspaud
Comment options

@mraspaud
Comment options

@keewis
Comment options

Answer selected by mraspaud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants