annoviko /
pyclustering
| Conditions | 3 |
| Total Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| Metric | Value |
|---|---|
| cc | 3 |
| dl | 0 |
| loc | 27 |
| rs | 8.8571 |
| c | 0 |
| b | 0 |
| f | 0 |
| 1 | """! |
||
| 2 | |||
| 3 | @brief Wrapper for CCORE library (part of this project). |
||
| 4 | |||
| 5 | @authors Andrei Novikov ([email protected]) |
||
| 6 | @date 2014-2017 |
||
| 7 | @copyright GNU Public License |
||
| 8 | |||
| 9 | @cond GNU_PUBLIC_LICENSE |
||
| 10 | PyClustering is free software: you can redistribute it and/or modify |
||
| 11 | it under the terms of the GNU General Public License as published by |
||
| 12 | the Free Software Foundation, either version 3 of the License, or |
||
| 13 | (at your option) any later version. |
||
| 14 | |||
| 15 | PyClustering is distributed in the hope that it will be useful, |
||
| 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 18 | GNU General Public License for more details. |
||
| 19 | |||
| 20 | You should have received a copy of the GNU General Public License |
||
| 21 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
| 22 | @endcond |
||
| 23 | |||
| 24 | """ |
||
| 25 | |||
| 26 | |||
| 27 | import os; |
||
| 28 | import sys; |
||
| 29 | |||
| 30 | from ctypes import *; |
||
|
0 ignored issues
–
show
Unused Code
introduced
by
Loading history...
|
|||
| 31 | |||
| 32 | from pyclustering.core.definitions import *; |
||
|
0 ignored issues
–
show
|
|||
| 33 | |||
| 34 | |||
| 35 | def load_core(): |
||
| 36 | if (PATH_PYCLUSTERING_CCORE_LIBRARY is None): |
||
| 37 | raise NameError("The pyclustering core is not supported for platform '" + sys.platform + "'.");
|
||
| 38 | |||
| 39 | if (os.path.exists(PATH_PYCLUSTERING_CCORE_LIBRARY) is False): |
||
| 40 | raise NameError("The pyclustering core is not found (expected core location: '" + PATH_PYCLUSTERING_CCORE_LIBRARY + "'). Probably pyclustering library has not been successfully installed.");
|
||
| 41 | |||
| 42 | return cdll.LoadLibrary(PATH_PYCLUSTERING_CCORE_LIBRARY); |
||
| 43 | |||
| 44 |