File: _sgd_fast_helpers.h

package info (click to toggle)
scikit-learn 0.23.2-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 21,892 kB
  • sloc: python: 132,020; cpp: 5,765; javascript: 2,201; ansic: 831; makefile: 213; sh: 44
file content (16 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// We cannot directly reuse the npy_isfinite from npy_math.h as numpy
// and scikit-learn are not necessarily built with the same compiler.
// When re-declaring the functions in the template for cython
// specific for each parameter input type, it needs to be 2 different functions
// as cython doesn't support function overloading.
#ifdef _MSC_VER
# include <float.h>
# define skl_isfinite _finite
# define skl_isfinite32 _finite
# define skl_isfinite64 _finite
#else
# include <numpy/npy_math.h>
# define skl_isfinite npy_isfinite
# define skl_isfinite32 npy_isfinite
# define skl_isfinite64 npy_isfinite
#endif