Skip to content

Commit

Permalink
MNT fix openMP deps in meson
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewSZhang committed Sep 12, 2024
1 parent d18d274 commit cec2acf
Show file tree
Hide file tree
Showing 5 changed files with 1,489 additions and 70 deletions.
8 changes: 7 additions & 1 deletion fastcan/_fastcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,18 @@ def fit(self, X, y):
"""
self._validate_params()
# X y
check_X_params = {"ensure_min_samples": 2, "order": "F", "dtype": float}
check_X_params = {
"ensure_min_samples": 2,
"order": "F",
"dtype": float,
"force_writeable": True,
}
check_y_params = {
"ensure_min_samples": 2,
"ensure_2d": False,
"order": "F",
"dtype": float,
"force_writeable": True,
}
X, y = self._validate_data(
X=X,
Expand Down
3 changes: 3 additions & 0 deletions fastcan/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
openmp_dep = dependency('OpenMP', language: 'c', required: false)

cython_args = [
'-X language_level=3', '-X boundscheck=False', '-X wraparound=False',
'-X initializedcheck=False', '-X nonecheck=False', '-X cdivision=True',
Expand All @@ -7,6 +9,7 @@ cython_args = [
py.extension_module(
'_cancorr_fast',
'_cancorr_fast.pyx',
dependencies: [openmp_dep],
subdir: 'fastcan',
cython_args: cython_args,
install: true
Expand Down
Empty file added fastcan/py.typed
Empty file.
Loading

0 comments on commit cec2acf

Please sign in to comment.