File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,13 @@ def __dask_tokenize__(self) -> str:
137137 return self .dask_name
138138
139139 def __dask_postcompute__ (self ) -> Any :
140- return lambda x : self ._in_memory_type (first (x )), ()
140+ def f (x ):
141+ out = self ._in_memory_type (first (x ))
142+ if hasattr (out , "_dask" ):
143+ del out ._dask
144+ return out
145+
146+ return f , ()
141147
142148 def __dask_postpersist__ (self ) -> Any :
143149 return self ._rebuild , ()
Original file line number Diff line number Diff line change @@ -553,3 +553,17 @@ def test_histref_pickle():
553553 h1 .fill (x ) # forces the internal state histref update
554554
555555 pickle .dumps (h1 ._histref )
556+
557+
558+ def test_boost_output_pickles ():
559+ import pickle
560+
561+ import boost_histogram
562+ import dask
563+
564+ import dask_histogram .boost
565+
566+ h = dask_histogram .boost .Histogram (boost_histogram .axis .Regular (10 , 0 , 1 ))
567+
568+ o = dask .compute (h )
569+ pickle .dumps (o )
You can’t perform that action at this time.
0 commit comments