<commit_before>import numpy as np

def unwrap(wrapped_array, 
           wrap_around_axis_0 = False, 
           wrap_around_axis_1 = False, 
           wrap_around_axis_2 = False):

    wrapped_array = np.require(wrapped_array, np.float32, ['C'])
    if wrapped_array.ndim not in [2,3]:
        raise ValueError('input array needs to have 2 or 3 dimensions')

    wrapped_array_masked = np.ma.asarray(wrapped_array)
    unwrapped_array = np.empty_like(wrapped_array_masked.data)
    if wrapped_array.ndim == 2:
        import unwrap2D
        unwrap2D._unwrap2D(wrapped_array_masked.data, 
                           np.ma.getmaskarray(wrapped_array_masked).astype(np.uint8),
                           unwrapped_array,
                           bool(wrap_around_axis_0), bool(wrap_around_axis_1))
    elif wrapped_array.ndim == 3:
        import unwrap3D
        unwrap3D._unwrap3D(wrapped_array_masked.data,
                           np.ma.getmaskarray(wrapped_array_masked).astype(np.uint8),
                           unwrapped_array,
                           bool(wrap_around_axis_0), bool(wrap_around_axis_1), bool(wrap_around_axis_2))

    if np.ma.isMaskedArray(wrapped_array):<commit_msg>unwrap: Use new imports in python module.<commit_after>import numpy as np

def unwrap(wrapped_array, 
           wrap_around_axis_0 = False, 
           wrap_around_axis_1 = False, 
           wrap_around_axis_2 = False):

    wrapped_array = np.require(wrapped_array, np.float32, ['C'])
    if wrapped_array.ndim not in [2,3]:
        raise ValueError('input array needs to have 2 or 3 dimensions')

    wrapped_array_masked = np.ma.asarray(wrapped_array)
    unwrapped_array = np.empty_like(wrapped_array_masked.data)
    if wrapped_array.ndim == 2:
        import _unwrap_2d
        _unwrap_2d._unwrap2D(wrapped_array_masked.data,
                           np.ma.getmaskarray(wrapped_array_masked).astype(np.uint8),
                           unwrapped_array,
                           bool(wrap_around_axis_0), bool(wrap_around_axis_1))
    elif wrapped_array.ndim == 3:
        import _unwrap_3d
        _unwrap_3d._unwrap3D(wrapped_array_masked.data,
                           np.ma.getmaskarray(wrapped_array_masked).astype(np.uint8),
                           unwrapped_array,
                           bool(wrap_around_axis_0), bool(wrap_around_axis_1), bool(wrap_around_axis_2))

    if np.ma.isMaskedArray(wrapped_array):
{'fraction_non_alphanumeric': 0.08118081180811808, 'fraction_numerical': 0.01968019680196802, 'mean_word_length': 2.3655172413793104, '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': '7558518', 'n_tokens_mistral': 801, 'n_tokens_neox': 792, 'n_words': 121}