<commit_before># -*- coding: utf-8 -*-

"""
hdfcompress.py
==============

Helper functions for writing bitshuffled compressed datatsets
"""

import numpy as np
import h5py
from h5py import h5f, h5d, h5z, h5t, h5s, filters

import quinoa

from .. import printlog

try:
    from bitshuffle import h5
    USE_BITSHUFFLE = True
except ImportError:
    USE_BITSHUFFLE = False

def guess_chunk(shape):
    """ Guess the optimal chunk size for a given shape
    :param shape: shape of dataset<commit_msg>Removing quinoa compression for now<commit_after># -*- coding: utf-8 -*-

"""
hdfcompress.py
==============

Helper functions for writing bitshuffled compressed datatsets
"""

import numpy as np
import h5py
from h5py import h5f, h5d, h5z, h5t, h5s, filters

from .. import printlog

try:
    from bitshuffle import h5
    USE_BITSHUFFLE = True
except ImportError:
    USE_BITSHUFFLE = False

def guess_chunk(shape):
    """ Guess the optimal chunk size for a given shape
    :param shape: shape of dataset
{'fraction_non_alphanumeric': 0.1036889332003988, 'fraction_numerical': 0.01794616151545364, 'mean_word_length': 3.9215686274509802, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4090470', 'n_tokens_mistral': 334, 'n_tokens_neox': 329, 'n_words': 117}