Skip to content

Commit c765b3e

Browse files
numpy 2 compatibility
1 parent 4cad834 commit c765b3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/check_commit_ial.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ d = {'time': ('<f4', ('mean', )), 'self': ('<f4', ('mean', 'max', 'min', 'std',
747747
'self_per_call': ('<f4', ('mean', )), 'total_per_call': ('<f4', ('mean', )), 'routine': ('U256', '')}
748748
arraynp = numpy.loadtxt('drhook.prof.concat', dtype=[(k, v[0]) for (k, v) in d.items()],
749749
converters={8: lambda s: s.split(b'@')[0].lstrip(b'*')},
750-
skiprows=$firstLine - 1, usecols=[1, 3, 4, 5, 6, 7, 8])
750+
skiprows=$firstLine - 1, usecols=[1, 3, 4, 5, 6, 7, 8], encoding='bytes')
751751
df = pandas.DataFrame(arraynp).groupby('routine').agg(
752752
**{k + '_' + agg:pandas.NamedAgg(column=k, aggfunc=agg)
753753
for (k, agg) in [(k, agg) for k in d.keys() for agg in d[k][1]]

tools/check_commit_testprogs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ d = {'time': ('<f4', ('mean', )), 'self': ('<f4', ('mean', 'max', 'min', 'std',
490490
'self_per_call': ('<f4', ('mean', )), 'total_per_call': ('<f4', ('mean', )), 'routine': ('U256', '')}
491491
arraynp = numpy.loadtxt('drhook.prof.0', dtype=[(k, v[0]) for (k, v) in d.items()],
492492
converters={8: lambda s: s.split(b'@')[0].lstrip(b'*')},
493-
skiprows=$firstLine - 1, usecols=[1, 3, 4, 5, 6, 7, 8])
493+
skiprows=$firstLine - 1, usecols=[1, 3, 4, 5, 6, 7, 8], encoding='bytes')
494494
df = pandas.DataFrame(arraynp).groupby('routine').agg(
495495
**{k + '_' + agg:pandas.NamedAgg(column=k, aggfunc=agg)
496496
for (k, agg) in [(k, agg) for k in d.keys() for agg in d[k][1]]

0 commit comments

Comments
 (0)