This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # +--------------------+ | |
| # | | | |
| # | GENERAL CONFIG | | |
| # | | | |
| # +--------------------+ | |
| PROBLEM_NAME := problem_name | |
| DEBUG := true | |
| LANG := cpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cimport cython | |
| import numpy as np | |
| cimport numpy as np | |
| from sklearn.metrics import f1_score | |
| @cython.boundscheck(False) | |
| @cython.wraparound(False) | |
| def f1_opt(np.ndarray[long, ndim=1] label, np.ndarray[double, ndim=1] preds): |