From 34e48c5e14cd2bef7ec17dd27a2f9f33ab400cbc Mon Sep 17 00:00:00 2001 From: Ed J Date: Fri, 20 Dec 2024 21:23:04 +0000 Subject: [PATCH] if xform only has one datatype, use that - #511 --- lib/PDL/Core/pdlapi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PDL/Core/pdlapi.c b/lib/PDL/Core/pdlapi.c index 662f29cd1..5576afcd7 100644 --- a/lib/PDL/Core/pdlapi.c +++ b/lib/PDL/Core/pdlapi.c @@ -1083,6 +1083,8 @@ static inline pdl_datatypes pdl__type_detect(pdl_trans *trans) { pdl_datatypes retval = PDL_INVALID, last_dtype = PDL_INVALID; PDL_Indx i; pdl_transvtable *vtable = trans->vtable; + if (vtable->gentypes[0] != PDL_INVALID && vtable->gentypes[0] == PDL_INVALID) + return vtable->gentypes[0]; /* only one allowed type, use that */ for (i=0; inpdls; i++) { pdl *pdl = trans->pdls[i]; short flags = vtable->par_flags[i];