@@ -506,23 +506,26 @@ end
506506 (InlineTimeDelta64{MINUTES}, " timedelta64[m]" ),
507507 (InlineTimeDelta64{(SECONDS, 5 )}, " timedelta64[5s]" ),
508508 (InlineTimeDelta64{NumpyDates. UNBOUND_UNITS}, " timedelta64" ),
509- (Tuple{}, np . dtype ( pylist () )),
510- (Tuple{Int32, Int32}, np . dtype ( pylist ([(" f0" , " int32" ), (" f1" , " int32" )]) )),
511- (@NamedTuple {}, np . dtype ( pylist () )),
512- (@NamedTuple {x:: Int32 , y:: Int32 }, np . dtype ( pylist ([(" x" , " int32" ), (" y" , " int32" )]) )),
513- (Pair{Int32, Int32}, np . dtype ( pylist ([(" first" , " int32" ), (" second" , " int32" )]) )),
509+ (Tuple{}, pylist ()),
510+ (Tuple{Int32, Int32}, pylist ([(" f0" , " int32" ), (" f1" , " int32" )])),
511+ (@NamedTuple {}, pylist ()),
512+ (@NamedTuple {x:: Int32 , y:: Int32 }, pylist ([(" x" , " int32" ), (" y" , " int32" )])),
513+ (Pair{Int32, Int32}, pylist ([(" first" , " int32" ), (" second" , " int32" )])),
514514 ]
515515 @test pyeq (Bool, pygetattr (pyjl (t), " __numpy_dtype__" ), np. dtype (d))
516516 @test pyeq (Bool, np. dtype (pyjl (t)), np. dtype (d))
517517 end
518518
519519 # unsupported cases
520520 @testset " $t -> AttributeError" for t in [
521+ # non-primitives or mutables
521522 String,
522523 Vector{Int},
524+ # pointers
523525 Ptr{Cvoid},
524526 Ptr{Int},
525- Ptr{PythonCall. C. PyPtr},
527+ # PyPtr specifically should NOT be interpreted as np.dtype("O")
528+ PythonCall. C. PyPtr,
526529 ]
527530 err = try
528531 pygetattr (pyjl (t), " __numpy_dtype__" )
0 commit comments