How to use the numcodecs.VLenUTF8 function in numcodecs

To help you get started, we’ve selected a few numcodecs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jdfekete / progressivis / progressivis / storage / zarr.py View on Github external
def create_dataset(self, name, shape=None, dtype=None, data=None, maxshape=None, **kwds):
        _ = maxshape
        if kwds.get('compression') is None:
            kwds.update(get_option('storage.zarr.filter', {}))
        filters = kwds.get('filters', [])
        filters.append(numcodecs.MsgPack())
        kwds['filters'] = filters
        if dtype == np.dtype('O') and kwds.get('object_codec') is None:
            kwds.update({'object_codec': numcodecs.VLenUTF8()})
        return super(ZARRGroup, self).create_dataset(name, shape=shape, dtype=dtype, data=data, **kwds)