Skip to content

Commit

Permalink
MNT fix OpenMP (in Windows) requires signed integral for prange
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewSZhang committed Sep 12, 2024
1 parent 07f7f66 commit af33941
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions fastcan/_cancorr_fast.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,12 @@ cpdef int _forward_search(
"""
cdef:
unsigned int n_samples = X.shape[0]
unsigned int n_features = X.shape[1]
# OpenMP (in Windows) requires signed integral for prange
int j, n_features = X.shape[1]
floating* r2 = <floating*> malloc(sizeof(floating) * n_features)
bint* mask = <bint*> malloc(sizeof(bint) * n_features)
floating g, ssc = 0.0
unsigned int i, j
unsigned int i
int index = -1

memset(&r2[0], 0, n_features * sizeof(floating))
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'fastcan',
'c', 'cython',
version: '0.2.2',
version: '0.2.3',
license: 'MIT',
meson_version: '>= 1.1.0',
default_options: [
Expand Down
4 changes: 2 additions & 2 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fastcan"
version = "0.2.2"
version = "0.2.3"
description = "A fast canonical-correlation-based feature selection method"
authors = [
{ name = "Matthew Sikai Zhang", email = "[email protected]" },
Expand Down

0 comments on commit af33941

Please sign in to comment.