| 3901 | } |
| 3902 | |
| 3903 | static PyObject * |
| 3904 | format_longfloat(PyObject *NPY_UNUSED(dummy), PyObject *args, PyObject *kwds) |
| 3905 | { |
| 3906 | PyObject *obj; |
| 3907 | unsigned int precision; |
| 3908 | static char *kwlist[] = {"x", "precision", NULL}; |
| 3909 | |
| 3910 | if (!PyArg_ParseTupleAndKeywords(args, kwds, "OI:format_longfloat", kwlist, |
| 3911 | &obj, &precision)) { |
| 3912 | return NULL; |
| 3913 | } |
| 3914 | if (!PyArray_IsScalar(obj, LongDouble)) { |
| 3915 | PyErr_SetString(PyExc_TypeError, |
| 3916 | "not a longfloat"); |
| 3917 | return NULL; |
| 3918 | } |
| 3919 | return Dragon4_Scientific(obj, DigitMode_Unique, precision, -1, 0, |
| 3920 | TrimMode_LeaveOneZero, -1, -1); |
| 3921 | } |
| 3922 | |
| 3923 | /* |
| 3924 | * returns 1 if array is a user-defined string dtype, sets an error and |
nothing calls this directly
no test coverage detected