Skip to content

Commit fb5634c

Browse files
authored
compat: numpy 2.5.0 (#981)
1 parent d17427b commit fb5634c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

fastparquet/converted_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def tobson(x):
3434
# Explicitly use numpy type in order to avoid promotion errors due to NEP 50 in numpy >= 2
3535
DAYS_TO_NANOS = np.int64(86400000000000)
3636
"""Number of nanoseconds in a day. Used to convert a Date to a date"""
37-
nat = np.datetime64('NaT').view('int64')
37+
nat = np.int64(-9223372036854775808) # np.datetime64('NaT').view('int64')
3838

3939
simple = {
4040
parquet_thrift.Type.INT32: np.dtype('int32'),

fastparquet/writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
MARKER = b'PAR1'
2828
ROW_GROUP_SIZE = 50_000_000
2929
NaT = np.timedelta64(None).tobytes() # require numpy version >= 1.7
30-
nat = np.datetime64('NaT').view('int64')
30+
nat = np.int64(-9223372036854775808) # np.datetime64('NaT').view('int64')
3131

3232
typemap = { # primitive type, converted type, bit width
3333
'boolean': (parquet_thrift.Type.BOOLEAN, None, 1),

0 commit comments

Comments
 (0)