Skip to content

Commit da4f790

Browse files
authored
Permit use of codec registry with N5Store (#577)
* enable arbitrary compressors for N5Store * enable arbitrary compressors for N5Store creation * pep8 * don't mutate the config dict * pep8
1 parent 4081199 commit da4f790

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zarr/n5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def compressor_config_to_n5(compressor_config):
461461

462462
else: # pragma: no cover
463463

464-
raise RuntimeError("Unknown compressor with id %s" % codec_id)
464+
n5_config.update({k: v for k, v in compressor_config.items() if k != 'type'})
465465

466466
return n5_config
467467

@@ -513,7 +513,7 @@ def compressor_config_to_zarr(compressor_config):
513513

514514
else: # pragma: no cover
515515

516-
raise RuntimeError("Unknown compressor with id %s" % codec_id)
516+
zarr_config.update({k: v for k, v in compressor_config.items() if k != 'type'})
517517

518518
return zarr_config
519519

0 commit comments

Comments
 (0)