Ignore:
Timestamp:
10/30/18 14:31:57 (6 years ago)
Author:
Hal Finkel <hfinkel@…>
Branches:
master, pympi
Children:
c8c291b
Parents:
22c1c0a
git-author:
Hal Finkel <hfinkel@…> (10/30/18 14:31:57)
git-committer:
Hal Finkel <hfinkel@…> (10/30/18 14:31:57)
Message:

import uint16 fix by Biwer, Christopher Michael <cmbiwer@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/genericio.py

    rbe75350 rdd56945  
    5757libpygio.get_variable_field_count.argtypes=[ct.c_char_p,ct.c_char_p] 
    5858 
     59libpygio.read_gio_uint16.restype=None 
     60libpygio.read_gio_uint16.argtypes=[ct.c_char_p,ct.c_char_p,ct.POINTER(ct.c_uint16),ct.c_int] 
     61 
    5962libpygio.read_gio_int32.restype=None 
    6063libpygio.read_gio_int32.argtypes=[ct.c_char_p,ct.c_char_p,ct.POINTER(ct.c_int),ct.c_int] 
     
    8386        return 
    8487    elif(var_type==9): 
    85         print("variable type not known (not int32/int64/float/double)") 
     88        print("variable type not known (not uint16/int32/int64/float/double)") 
    8689    elif(var_type==0): 
    8790        #float 
     
    104107        libpygio.read_gio_int64(file_name,var_name,result.ctypes.data_as(ct.POINTER(ct.c_int64)),field_count) 
    105108        return result         
     109    elif(var_type==4): 
     110        #uint16 
     111        result = np.ndarray((var_size,field_count),dtype=np.uint16) 
     112        libpygio.read_gio_uint16(file_name,var_name,result.ctypes.data_as(ct.POINTER(ct.c_uint16)),field_count) 
     113        return result 
    106114 
    107115def gio_has_variable(file_name,var_name): 
Note: See TracChangeset for help on using the changeset viewer.