<commit_before>from libcpp.vector cimport vector
cimport numpy as cnp
import numpy as np
import ctypes
import os.path as osp
import cgt
cimport cpython
import cgt


cnp.import_array()

################################################################
### CGT common datatypes 
################################################################
 
cdef extern from "cgt_common.h":

    cdef enum cgt_dtype:
        cgt_i1
        cgt_i2
        cgt_i4
        cgt_i8
        cgt_f2
        cgt_f4
        cgt_f8
        cgt_f16
        cgt_c8
        cgt_c16
        cgt_c32
        cgt_O

    cppclass IRC[T]:
        pass

    ctypedef void (*cgt_inplacefun)(void*, cgt_object**);
    ctypedef cgt_object* (*cgt_valretfun)(void*, cgt_object**);

    enum cgt_devtype:
        cgt_cpu
        cgt_gpu

    enum cgt_typetag:
        cgt_undef
        cgt_tupletype
        cgt_arraytype
    
    cppclass cgt_object:
        pass

    cppclass cgt_array(cgt_object):
        cgt_array(int, size_t*, cgt_dtype, cgt_devtype)
        int ndim
        cgt_dtype dtype
        cgt_devtype devtype
        size_t* shape
        void* data
        size_t stride
        bint ownsdata    

    cppclass cgt_tuple(cgt_object):
        cgt_tuple(size_t)
        void setitem(int, cgt_object*)
        cgt_object* getitem(int)
        cgt_typetag typetag
        int len
        cgt_object** members        <commit_msg>fix cython syntax<commit_after>from libcpp.vector cimport vector
cimport numpy as cnp
import numpy as np
import ctypes
import os.path as osp
import cgt
cimport cpython
import cgt


cnp.import_array()

################################################################
### CGT common datatypes 
################################################################
 
cdef extern from "cgt_common.h":

    cdef enum cgt_dtype:
        cgt_i1
        cgt_i2
        cgt_i4
        cgt_i8
        cgt_f2
        cgt_f4
        cgt_f8
        cgt_f16
        cgt_c8
        cgt_c16
        cgt_c32
        cgt_O

    cppclass IRC[T]:
        pass

    ctypedef void (*cgt_inplacefun)(void*, cgt_object**)
    ctypedef cgt_object* (*cgt_valretfun)(void*, cgt_object**)

    enum cgt_devtype:
        cgt_cpu
        cgt_gpu

    enum cgt_typetag:
        cgt_undef
        cgt_tupletype
        cgt_arraytype
    
    cppclass cgt_object:
        pass

    cppclass cgt_array(cgt_object):
        cgt_array(int, size_t*, cgt_dtype, cgt_devtype)
        int ndim
        cgt_dtype dtype
        cgt_devtype devtype
        size_t* shape
        void* data
        size_t stride
        bint ownsdata    

    cppclass cgt_tuple(cgt_object):
        cgt_tuple(size_t)
        void setitem(int, cgt_object*)
        cgt_object* getitem(int)
        cgt_typetag typetag
        int len
        cgt_object** members        
{'fraction_non_alphanumeric': 0.1388888888888889, 'fraction_numerical': 0.009971509971509971, 'mean_word_length': 2.1812004530011326, 'pattern_counts': {'":': 2, '<': 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': '3896509', 'n_tokens_mistral': 986, 'n_tokens_neox': 943, 'n_words': 210}