File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -147,14 +147,28 @@ def load(
147147 for filename in filenames :
148148 datafile_path = os .path .join (self .record .repository , "dataset" , filename )
149149
150- self . _content [ filename . split ( "." )[ 0 ]] = np .genfromtxt (
150+ data = np .genfromtxt (
151151 datafile_path ,
152152 delimiter = "," ,
153153 names = True ,
154154 dtype = None ,
155155 encoding = "utf-8" ,
156156 )
157157
158+ # NOTE: Convert numpy integer dtypes to Python int (object dtype)
159+ # to avoid NumPy 2.x dtype conversion issues on Linux
160+ if data .dtype .names :
161+ new_dtype = []
162+ for name in data .dtype .names :
163+ dtype = data .dtype [name ]
164+ if np .issubdtype (dtype , np .integer ):
165+ new_dtype .append ((name , object ))
166+ else :
167+ new_dtype .append ((name , dtype ))
168+ data = data .astype (new_dtype , copy = False )
169+
170+ self ._content [filename .split ("." )[0 ]] = data
171+
158172 hues = [
159173 "Red" ,
160174 "Red-yellow" ,
You can’t perform that action at this time.
0 commit comments