check_build_prereqs#
- scikitplot.cython.check_build_prereqs(*, numpy=False, pybind11=False)[source]#
Check whether build prerequisites are importable.
- Parameters:
- numpybool, default=False
If True, also check NumPy availability.
- pybind11bool, default=False
If True, also check pybind11 availability (Scenario 3 & 4).
- Returns:
- dict[str, Any]
Keys:
cython,setuptools, optionallynumpy,pybind11. Each value:{"ok": bool, "version": str}.
- Parameters:
- Return type:
Notes
Newbie (Scenarios 1 & 2): run this to understand your environment. Pro/master (Scenarios 3-5): use the scenario-specific helpers in
scikitplot.cython._custom_compilerfor targeted checks.Examples
>>> result = check_build_prereqs() >>> "cython" in result and "setuptools" in result True >>> result = check_build_prereqs(numpy=True, pybind11=True) >>> all(k in result for k in ("cython", "setuptools", "numpy", "pybind11")) True
Gallery examples#
Multi-file builds: .pxi includes and external headers
Multi-file builds: .pxi includes and external headers
Vector ops without NumPy: array(‘d’) + memoryviews
Vector ops without NumPy: array('d') + memoryviews
Workflow templates (train / hpo / predict) + CLI entry template
Workflow templates (train / hpo / predict) + CLI entry template