@@ -223,7 +223,7 @@ class LZMA(_NumcodecsBytesBytesCodec, codec_name="lzma"):
223
223
224
224
class Shuffle (_NumcodecsBytesBytesCodec , codec_name = "shuffle" ):
225
225
def evolve_from_array_spec (self , array_spec : ArraySpec ) -> Shuffle :
226
- if self .codec_config .get ("elementsize" , None ) is None :
226
+ if self .codec_config .get ("elementsize" ) is None :
227
227
return Shuffle (** {** self .codec_config , "elementsize" : array_spec .dtype .itemsize })
228
228
return self # pragma: no cover
229
229
@@ -247,7 +247,7 @@ def resolve_metadata(self, chunk_spec: ArraySpec) -> ArraySpec:
247
247
return chunk_spec
248
248
249
249
def evolve_from_array_spec (self , array_spec : ArraySpec ) -> FixedScaleOffset :
250
- if self .codec_config .get ("dtype" , None ) is None :
250
+ if self .codec_config .get ("dtype" ) is None :
251
251
return FixedScaleOffset (** {** self .codec_config , "dtype" : str (array_spec .dtype )})
252
252
return self
253
253
@@ -257,7 +257,7 @@ def __init__(self, **codec_config: JSON) -> None:
257
257
super ().__init__ (** codec_config )
258
258
259
259
def evolve_from_array_spec (self , array_spec : ArraySpec ) -> Quantize :
260
- if self .codec_config .get ("dtype" , None ) is None :
260
+ if self .codec_config .get ("dtype" ) is None :
261
261
return Quantize (** {** self .codec_config , "dtype" : str (array_spec .dtype )})
262
262
return self
263
263
@@ -280,7 +280,7 @@ def resolve_metadata(self, chunk_spec: ArraySpec) -> ArraySpec:
280
280
return replace (chunk_spec , dtype = np .dtype (self .codec_config ["encode_dtype" ])) # type: ignore[arg-type]
281
281
282
282
def evolve_from_array_spec (self , array_spec : ArraySpec ) -> AsType :
283
- if self .codec_config .get ("decode_dtype" , None ) is None :
283
+ if self .codec_config .get ("decode_dtype" ) is None :
284
284
return AsType (** {** self .codec_config , "decode_dtype" : str (array_spec .dtype )})
285
285
return self
286
286
0 commit comments