File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -136,18 +136,14 @@ def to_dict(self) -> dict[str, JSON]:
136136 }
137137
138138 def evolve_from_array_spec (self , array_spec : ArraySpec ) -> Self :
139- dtype = array_spec .dtype
139+ dtype = array_spec .dtype . to_dtype ()
140140 new_codec = self
141141 if new_codec .typesize is None :
142- new_codec = replace (new_codec , typesize = dtype .to_dtype (). itemsize )
142+ new_codec = replace (new_codec , typesize = dtype .itemsize )
143143 if new_codec .shuffle is None :
144144 new_codec = replace (
145145 new_codec ,
146- shuffle = (
147- BloscShuffle .bitshuffle
148- if dtype .to_dtype ().itemsize == 1
149- else BloscShuffle .shuffle
150- ),
146+ shuffle = (BloscShuffle .bitshuffle if dtype .itemsize == 1 else BloscShuffle .shuffle ),
151147 )
152148
153149 return new_codec
You can’t perform that action at this time.
0 commit comments