79136771

Date: 2024-10-29 10:29:44
Score: 2
Natty:
Report link

With what @Dan Masek said, i have this code that works :

def lecture_EMUGS(universal_path):
val_array = np.array(np.genfromtxt(universal_path, delimiter="", skip_header=1, encoding='unicode_escape', converters={0:int, 1 : str}).tolist())

hh_min_ss = np.array([i.split(':', 2) for i in val_array[:,1]]).astype(float)
s = hh_min_ss[:,0]*3600 + hh_min_ss[:,1]*60 + hh_min_ss[:,2]

val_array[:,1] = s
return val_array.astype(float)
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Dan
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Camille