diff options
| author | Yashasvi Misra <yashasvimisra_bh@srmuniv.edu.in> | 2021-08-19 19:35:42 +0000 |
|---|---|---|
| committer | Yashasvi Misra <yashasvimisra_bh@srmuniv.edu.in> | 2021-08-19 19:35:42 +0000 |
| commit | af0fe021058c045748e0117eee4e856c60c879c5 (patch) | |
| tree | fdf10a75ab8d27baccb4c99f01ce038cfaf8c6ca | |
| parent | 5350aa0972a394afcda4ad6ecaca7690cbe5f702 (diff) | |
| download | numpy-af0fe021058c045748e0117eee4e856c60c879c5.tar.gz | |
update
| -rw-r--r-- | numpy/core/src/multiarray/lowlevel_strided_loops.c.src | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src index e533e4932..e38873746 100644 --- a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src +++ b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src @@ -819,6 +819,10 @@ NPY_NO_EXPORT PyArrayMethod_StridedLoop * # define _CONVERT_FN(x) npy_floatbits_to_halfbits(x) # elif @is_double1@ # define _CONVERT_FN(x) npy_doublebits_to_halfbits(x) +# elif @is_half1@ +# define _CONVERT_FN(x) (x) +# elif @is_bool1@ +# define _CONVERT_FN(x) npy_float_to_half((float)(x!=0)) # else # define _CONVERT_FN(x) npy_float_to_half((float)x) # endif |
