<commit_before>#!/usr/bin/env python
"""
 NumWrap.py - Interface to Numeric and numpy

 An interface to the Numeric and numpy libraries that will (hopefully)
 make the transformation to numpy go as seamlessly as possible.

 Also interfaces the LinearAlgebra and numpy.linalg libraries, since
 these have to be done consistently with the Numeric/numpy choice
"""

use_numpy = True
import re
pat = re.compile('\D')

if use_numpy:
    from numpy import array,zeros,concatenate,dot,ravel,arange
    from numpy import arcsinh,diagonal,identity,choose,transpose
    from numpy import reshape,take
    from numpy import where
    from numpy import __version__ as version
    from numpy.oldnumeric import NewAxis
    a,b,c = map(int,pat.split(version))
    big_version = 100*a+10*b+c
    if big_version >= 100:
        from numpy.oldnumeric.linear_algebra import determinant
        from numpy.oldnumeric.linear_algebra import Heigenvectors
        from numpy.oldnumeric.linear_algebra import solve_linear_equations
        import numpy.oldnumeric.mlab as MLab
    elif big_version >= 98:<commit_msg>yet another hack to get numpy versioning to work in numwrap<commit_after>#!/usr/bin/env python
"""
 NumWrap.py - Interface to Numeric and numpy

 An interface to the Numeric and numpy libraries that will (hopefully)
 make the transformation to numpy go as seamlessly as possible.

 Also interfaces the LinearAlgebra and numpy.linalg libraries, since
 these have to be done consistently with the Numeric/numpy choice
"""

use_numpy = True
import re
pat = re.compile('\D')

if use_numpy:
    from numpy import array,zeros,concatenate,dot,ravel,arange
    from numpy import arcsinh,diagonal,identity,choose,transpose
    from numpy import reshape,take
    from numpy import where
    from numpy import __version__ as version
    from numpy.oldnumeric import NewAxis

    words = map(int,pat.split(version))
    big_version = 100*words[0] + 10*words[1]
    if len(words) > 2: big_version += words[0]

    if big_version >= 100:
        from numpy.oldnumeric.linear_algebra import determinant
        from numpy.oldnumeric.linear_algebra import Heigenvectors
        from numpy.oldnumeric.linear_algebra import solve_linear_equations
        import numpy.oldnumeric.mlab as MLab
    elif big_version >= 98:
{'fraction_non_alphanumeric': 0.06498037505451373, 'fraction_numerical': 0.010466637592673354, 'mean_word_length': 4.008733624454148, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '2597641', 'n_tokens_mistral': 692, 'n_tokens_neox': 636, 'n_words': 229}