diff --git a/ml_dtypes/_src/int4_numpy.h b/ml_dtypes/_src/int4_numpy.h index 0d3f954a..ddd9b54e 100644 --- a/ml_dtypes/_src/int4_numpy.h +++ b/ml_dtypes/_src/int4_numpy.h @@ -165,7 +165,8 @@ bool CastToInt4(PyObject* arg, T* output) { return floating_conversion(double{}); } if (PyArray_IsScalar(arg, LongDouble)) { - return floating_conversion((long double){}); + using ld = long double; + return floating_conversion(ld{}); } return false; }