scikit-misc 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/.cirrus.star +9 -1
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/.gitattributes +0 -1
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/.spin/cmds.py +1 -1
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/Makefile +3 -3
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/PKG-INFO +7 -5
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/changelog.rst +14 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/theme.conf +0 -3
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/pyproject.toml +15 -25
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/_version.py +1 -1
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/meson.build +1 -1
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/_loess.pyx +7 -12
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/test_loess.py +4 -4
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/meson.build +7 -12
- scikit_misc-0.4.0/tools/build_theme.sh +29 -0
- scikit_misc-0.4.0/tools/deploy_documentation.sh +84 -0
- scikit_misc-0.4.0/tools/openblas_support.py +379 -0
- scikit_misc-0.4.0/tools/wheels/LICENSE_linux.txt +880 -0
- scikit_misc-0.4.0/tools/wheels/LICENSE_osx.txt +789 -0
- scikit_misc-0.4.0/tools/wheels/LICENSE_win32.txt +881 -0
- scikit_misc-0.4.0/tools/wheels/check_license.py +57 -0
- scikit_misc-0.4.0/tools/wheels/cibw_before_build_linux.sh +13 -0
- scikit_misc-0.4.0/tools/wheels/cibw_before_build_macos.sh +80 -0
- scikit_misc-0.4.0/tools/wheels/cibw_before_build_win.sh +36 -0
- scikit_misc-0.4.0/tools/wheels/cibw_test_command.sh +12 -0
- scikit_misc-0.4.0/tools/wheels/gfortran_utils.sh +171 -0
- scikit_misc-0.4.0/tools/wheels/howto.txt +47 -0
- scikit_misc-0.4.0/tools/wheels/repair_windows.sh +32 -0
- scikit_misc-0.4.0/tools/wheels/test.f +3 -0
- scikit_misc-0.3.0/setup.py +0 -4
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/.gitignore +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/.pre-commit-config.yaml +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/LICENSE +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/README.rst +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/Makefile +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/_static/copybutton.js +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/_static/custom.css +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/_templates/cython_class.rst +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/_templates/layout.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/api.rst +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/conf.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/index.rst +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/installation.rst +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/loess.rst +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/sphinxext/__init__.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/sphinxext/inline_code_highlight.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/globaltoc.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/layout.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/localtoc.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/navbar-2.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/navbar.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/navbarsearchbox.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/navbartoc.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/relations.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/search.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/searchbox.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/searchresults.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/sourcelink.html +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/static/bootstrap-3.4.1/css/bootstrap.min.css +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/static/bootstrap-3.4.1/js/bootstrap.min.js +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/static/bootstrap-sphinx.css_t +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/static/bootstrap-sphinx.js_t +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/static/js/jquery-1.12.4.min.js +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/doc/theme/static/js/jquery-fix.js +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/examples/loess-basic-usage.ipynb +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/examples/requirements-examples.txt +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/meson.build +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/meson_options.txt +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/requirements/build.txt +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/requirements/dev.txt +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/requirements/docs.txt +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/requirements/release.txt +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/__config__.py.in +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/__init__.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/_build_utils/copy_version_to_dist.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/_build_utils/gcc_build_bitness.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/_build_utils/version_please.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/_distributor_init.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/_version.py.in +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/LICENSE.txt +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/__init__.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/S.h +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/c_loess.pxd +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/linpack_lite.f +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/loess.c +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/loess.h +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/loessc.c +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/loessf.f +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/misc.c +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/src/predict.c +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/__init__.py +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/co2_data +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/co2_results_double +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/co2_results_real +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/gas_data +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/gas_result +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/madeup_data +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/madeup_result +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/skmisc/loess/tests/meson.build +0 -0
- {scikit_misc-0.3.0 → scikit_misc-0.4.0}/spin +0 -0
|
@@ -13,6 +13,12 @@ BUILD_PATTERN = re.compile(
|
|
|
13
13
|
r"\[wheel build(: (?P<build_ref>.+?))?\]"
|
|
14
14
|
)
|
|
15
15
|
|
|
16
|
+
# This may match false postives but it is good enough.
|
|
17
|
+
# Bad matches will be caught in the python check
|
|
18
|
+
SEMVER_TAG_PATTERN = re.compile(
|
|
19
|
+
r"^v\d+\.\d+\.\d+((a|b|rc)\d+)?$"
|
|
20
|
+
)
|
|
21
|
+
|
|
16
22
|
def main(ctx):
|
|
17
23
|
######################################################################
|
|
18
24
|
# Should wheels be built?
|
|
@@ -32,6 +38,7 @@ def main(ctx):
|
|
|
32
38
|
url = "https://api.github.com/repos/has2k1/scikit-misc/git/commits/" + SHA
|
|
33
39
|
dct = http.get(url).json()
|
|
34
40
|
message = dct["message"]
|
|
41
|
+
tag = env.get("CIRRUS_TAG")
|
|
35
42
|
|
|
36
43
|
# this configuration runs a single linux_aarch64 + macosx_arm64 run.
|
|
37
44
|
# there's no need to do this during a wheel run as they automatically build
|
|
@@ -40,6 +47,7 @@ def main(ctx):
|
|
|
40
47
|
return []
|
|
41
48
|
|
|
42
49
|
m = BUILD_PATTERN.search(message)
|
|
43
|
-
if
|
|
50
|
+
m2 = SEMVER_TAG_PATTERN.match(tag) if tag else None
|
|
51
|
+
if not m and not m2:
|
|
44
52
|
return []
|
|
45
53
|
return fs.read("ci/cirrus_wheels.yml")
|
|
@@ -90,7 +90,7 @@ def sdist():
|
|
|
90
90
|
📦 Build a source distribution in `build/meson-dist/`.
|
|
91
91
|
"""
|
|
92
92
|
# Using the build module gives better results than using
|
|
93
|
-
# meson
|
|
93
|
+
# meson directly. It creates an sdist with PKG-INFO
|
|
94
94
|
util.run([
|
|
95
95
|
"python",
|
|
96
96
|
"-m",
|
|
@@ -40,7 +40,7 @@ clean-test:
|
|
|
40
40
|
rm -fr htmlcov/
|
|
41
41
|
|
|
42
42
|
ruff:
|
|
43
|
-
ruff . $(args)
|
|
43
|
+
ruff check . $(args)
|
|
44
44
|
|
|
45
45
|
ruff-isort:
|
|
46
46
|
ruff --select I001 --quiet . $(args)
|
|
@@ -73,8 +73,8 @@ dist: clean sdist wheel
|
|
|
73
73
|
python -m build
|
|
74
74
|
|
|
75
75
|
develop: build
|
|
76
|
-
pip install
|
|
76
|
+
uv pip install -e ".[all]"
|
|
77
77
|
|
|
78
78
|
update:
|
|
79
|
-
pip list --outdated | cut -d ' ' -f1 | xargs -n1 pip install -U
|
|
79
|
+
uv pip list --outdated | cut -d ' ' -f1 | xargs -n1 pip install -U
|
|
80
80
|
pre-commit autoupdate
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: scikit-misc
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Miscellaneous tools for scientific computing.
|
|
5
5
|
Home-page: https://has2k1.github.io/scikit-misc/stable
|
|
6
6
|
Author-Email: Hassan Kibirige <has2k1@gmail.com>
|
|
@@ -39,27 +39,29 @@ Classifier: Operating System :: POSIX
|
|
|
39
39
|
Classifier: Programming Language :: C
|
|
40
40
|
Classifier: Programming Language :: Fortran
|
|
41
41
|
Classifier: Programming Language :: Python :: 3
|
|
42
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
43
42
|
Classifier: Programming Language :: Python :: 3.10
|
|
44
43
|
Classifier: Programming Language :: Python :: 3.11
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
45
45
|
Classifier: Topic :: Scientific/Engineering
|
|
46
46
|
Project-URL: Homepage, https://has2k1.github.io/scikit-misc/stable
|
|
47
47
|
Project-URL: Repository, https://github.com/has2k1/scikit-misc
|
|
48
48
|
Project-URL: Documentation, https://has2k1.github.io/scikit-misc/stable
|
|
49
49
|
Project-URL: Changelog, https://has2k1.github.io/scikit-misc/stable/changelog.html
|
|
50
|
-
Requires-Python: >=3.
|
|
51
|
-
Requires-Dist: numpy>=1.
|
|
50
|
+
Requires-Python: >=3.10
|
|
51
|
+
Requires-Dist: numpy>=1.23.5
|
|
52
52
|
Requires-Dist: scikit-misc[doc]; extra == "all"
|
|
53
53
|
Requires-Dist: scikit-misc[build]; extra == "all"
|
|
54
54
|
Requires-Dist: scikit-misc[lint]; extra == "all"
|
|
55
55
|
Requires-Dist: scikit-misc[test]; extra == "all"
|
|
56
56
|
Requires-Dist: scikit-misc[dev]; extra == "all"
|
|
57
|
-
Requires-Dist:
|
|
57
|
+
Requires-Dist: numpydoc; extra == "doc"
|
|
58
58
|
Requires-Dist: sphinx; extra == "doc"
|
|
59
|
+
Requires-Dist: cython; extra == "build"
|
|
59
60
|
Requires-Dist: build; extra == "build"
|
|
60
61
|
Requires-Dist: spin; extra == "build"
|
|
61
62
|
Requires-Dist: meson; extra == "build"
|
|
62
63
|
Requires-Dist: meson-python; extra == "build"
|
|
64
|
+
Requires-Dist: ninja; extra == "build"
|
|
63
65
|
Requires-Dist: ruff; extra == "lint"
|
|
64
66
|
Requires-Dist: pytest-cov; extra == "test"
|
|
65
67
|
Requires-Dist: wheel; extra == "dev"
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
v0.4.0
|
|
5
|
+
------
|
|
6
|
+
*(2024-06-22)*
|
|
7
|
+
|
|
8
|
+
- Dropped support for python==3.9
|
|
9
|
+
- Made compatible with numpy 2.0
|
|
10
|
+
- Include tools/ in the source distribution
|
|
11
|
+
|
|
12
|
+
v0.3.1
|
|
13
|
+
------
|
|
14
|
+
*(2023-12-14)*
|
|
15
|
+
|
|
16
|
+
- Include tools/ in the source distribution
|
|
17
|
+
|
|
4
18
|
v0.3.0
|
|
5
19
|
------
|
|
6
20
|
*(2023-07-06)*
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
name = "scikit-misc"
|
|
4
4
|
description = "Miscellaneous tools for scientific computing."
|
|
5
5
|
license = {file = "LICENSE"}
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
7
|
authors = [
|
|
8
8
|
{name = "Hassan Kibirige", email = "has2k1@gmail.com"},
|
|
9
9
|
]
|
|
10
10
|
dynamic = ['version']
|
|
11
11
|
readme = "README.rst"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"numpy>=1.
|
|
13
|
+
"numpy>=1.23.5",
|
|
14
14
|
]
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Intended Audience :: Science/Research",
|
|
@@ -22,9 +22,9 @@ classifiers = [
|
|
|
22
22
|
"Programming Language :: C",
|
|
23
23
|
"Programming Language :: Fortran",
|
|
24
24
|
"Programming Language :: Python :: 3",
|
|
25
|
-
"Programming Language :: Python :: 3.9",
|
|
26
25
|
"Programming Language :: Python :: 3.10",
|
|
27
26
|
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
28
|
"Topic :: Scientific/Engineering",
|
|
29
29
|
]
|
|
30
30
|
|
|
@@ -38,15 +38,17 @@ all = [
|
|
|
38
38
|
]
|
|
39
39
|
|
|
40
40
|
doc = [
|
|
41
|
-
"
|
|
41
|
+
"numpydoc",
|
|
42
42
|
"sphinx",
|
|
43
43
|
]
|
|
44
44
|
|
|
45
45
|
build = [
|
|
46
|
+
"cython",
|
|
46
47
|
"build",
|
|
47
48
|
"spin",
|
|
48
49
|
"meson",
|
|
49
|
-
"meson-python"
|
|
50
|
+
"meson-python",
|
|
51
|
+
"ninja",
|
|
50
52
|
]
|
|
51
53
|
|
|
52
54
|
lint = [
|
|
@@ -72,30 +74,16 @@ changelog = "https://has2k1.github.io/scikit-misc/stable/changelog.html"
|
|
|
72
74
|
[build-system]
|
|
73
75
|
build-backend = 'mesonpy'
|
|
74
76
|
requires = [
|
|
75
|
-
"meson-python>=0.
|
|
76
|
-
"Cython>=0.
|
|
77
|
+
"meson-python>=0.15.0",
|
|
78
|
+
"Cython>=3.0.8", # when updating version, also update check in meson.build
|
|
77
79
|
"setuptools",
|
|
78
80
|
"wheel",
|
|
79
81
|
|
|
80
|
-
# https://github.com/scipy/scipy/blob/main/pyproject.toml
|
|
81
82
|
# NumPy dependencies - to update these, sync from
|
|
82
|
-
# https://github.com/scipy/
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
|
|
86
|
-
# now matches minimum supported version, keep here as separate requirement
|
|
87
|
-
# to be able to sync more easily with oldest-supported-numpy
|
|
88
|
-
|
|
89
|
-
# default numpy requirements
|
|
90
|
-
"numpy==1.22.4; python_version<='3.10' and platform_python_implementation != 'PyPy'",
|
|
91
|
-
"numpy==1.23.2; python_version=='3.11' and platform_python_implementation != 'PyPy'",
|
|
92
|
-
|
|
93
|
-
# For Python versions which aren't yet officially supported,
|
|
94
|
-
# we specify an unpinned NumPy which allows source distributions
|
|
95
|
-
# to be used and allows wheels to be used as soon as they
|
|
96
|
-
# become available.
|
|
97
|
-
"numpy; python_version>='3.12'",
|
|
98
|
-
"numpy; python_version>='3.9' and platform_python_implementation=='PyPy'",
|
|
83
|
+
# https://github.com/scipy/scipy/blob/main/pyproject.toml
|
|
84
|
+
# building against 2.x yields wheels that are also compatible with
|
|
85
|
+
# numpy 1.x at runtime.
|
|
86
|
+
"numpy>=2.0",
|
|
99
87
|
]
|
|
100
88
|
|
|
101
89
|
|
|
@@ -119,6 +107,8 @@ omit = [
|
|
|
119
107
|
########## Tool - Ruff ##########
|
|
120
108
|
[tool.ruff]
|
|
121
109
|
line-length = 79
|
|
110
|
+
|
|
111
|
+
[tool.ruff.lint]
|
|
122
112
|
select = ["E", "F", "C"]
|
|
123
113
|
ignore = [
|
|
124
114
|
"E741", # Ambiguous l
|
|
@@ -39,7 +39,7 @@ py.extension_module(
|
|
|
39
39
|
'src/predict.c',
|
|
40
40
|
loess_cython_gen.process('src/_loess.pyx')
|
|
41
41
|
],
|
|
42
|
-
c_args: [cython_c_args
|
|
42
|
+
c_args: [cython_c_args],
|
|
43
43
|
dependencies: [py_dep, npymath_lib, np_dep],
|
|
44
44
|
link_with: [floess_lib],
|
|
45
45
|
link_args: [cython_c_link_args],
|
|
@@ -76,10 +76,8 @@ cdef class loess_inputs:
|
|
|
76
76
|
# if none was allocated prior to the error.
|
|
77
77
|
self.allocated = False
|
|
78
78
|
|
|
79
|
-
x = np.
|
|
80
|
-
|
|
81
|
-
y = np.array(y, copy=False, subok=True,
|
|
82
|
-
dtype=np.float_, order='C')
|
|
79
|
+
x = np.asarray(x, dtype=np.float64, order='C')
|
|
80
|
+
y = np.asarray(y, dtype=np.float64, order='C')
|
|
83
81
|
n = len(x)
|
|
84
82
|
|
|
85
83
|
# Check the dimensions
|
|
@@ -100,13 +98,12 @@ cdef class loess_inputs:
|
|
|
100
98
|
"observations.")
|
|
101
99
|
|
|
102
100
|
if weights is None:
|
|
103
|
-
weights = np.ones((n,), dtype=np.
|
|
101
|
+
weights = np.ones((n,), dtype=np.float64)
|
|
104
102
|
|
|
105
103
|
if weights.ndim > 1 or weights.size != n:
|
|
106
104
|
raise ValueError("Invalid size of the 'weights' vector!")
|
|
107
105
|
|
|
108
|
-
weights = np.
|
|
109
|
-
dtype=np.float_, order='C')
|
|
106
|
+
weights = np.asarray(weights, dtype=np.float64, order='C')
|
|
110
107
|
|
|
111
108
|
# Python objects -> C structures -> *data in C structures
|
|
112
109
|
_x = x.ravel()
|
|
@@ -417,8 +414,7 @@ cdef class loess_model:
|
|
|
417
414
|
"of booleans with length equal to the number "
|
|
418
415
|
"of independent variables")
|
|
419
416
|
|
|
420
|
-
p_ndr = np.atleast_1d(np.
|
|
421
|
-
dtype=bool))
|
|
417
|
+
p_ndr = np.atleast_1d(np.asarray(value, dtype=bool))
|
|
422
418
|
for i in range(self.p):
|
|
423
419
|
self._base.parametric[i] = p_ndr[i]
|
|
424
420
|
|
|
@@ -438,8 +434,7 @@ cdef class loess_model:
|
|
|
438
434
|
"of booleans with length equal to the number "
|
|
439
435
|
"of independent variables")
|
|
440
436
|
|
|
441
|
-
d_ndr = np.atleast_1d(np.
|
|
442
|
-
subok=True, dtype=bool))
|
|
437
|
+
d_ndr = np.atleast_1d(np.asarray(value, dtype=bool))
|
|
443
438
|
for i in range(self.p):
|
|
444
439
|
self._base.drop_square[i] = d_ndr[i]
|
|
445
440
|
|
|
@@ -685,7 +680,7 @@ cdef class loess_prediction:
|
|
|
685
680
|
self.allocated = False
|
|
686
681
|
|
|
687
682
|
# Note : we need a copy as we may have to normalize
|
|
688
|
-
p_ndr = np.
|
|
683
|
+
p_ndr = np.asarray(newdata, copy=True, order='C')
|
|
689
684
|
p_ndr = p_ndr.astype(float)
|
|
690
685
|
|
|
691
686
|
# Dimensions should match those of the input
|
|
@@ -19,11 +19,11 @@ def madeup_data():
|
|
|
19
19
|
f.readline()
|
|
20
20
|
x = np.fromiter(
|
|
21
21
|
(float(v) for v in f.readline().rstrip().split()),
|
|
22
|
-
np.
|
|
22
|
+
np.float64).reshape(-1, 2)
|
|
23
23
|
f.readline()
|
|
24
24
|
y = np.fromiter(
|
|
25
25
|
(float(v) for v in f.readline().rstrip().split()),
|
|
26
|
-
np.
|
|
26
|
+
np.float64)
|
|
27
27
|
|
|
28
28
|
results = []
|
|
29
29
|
with open(rfile, 'r') as f:
|
|
@@ -31,7 +31,7 @@ def madeup_data():
|
|
|
31
31
|
f.readline()
|
|
32
32
|
z = np.fromiter(
|
|
33
33
|
(float(v) for v in f.readline().rstrip().split()),
|
|
34
|
-
np.
|
|
34
|
+
np.float64)
|
|
35
35
|
results.append(z)
|
|
36
36
|
|
|
37
37
|
newdata1 = np.array([[-2.5, 0.], [2.5, 0.], [0., 0.]])
|
|
@@ -58,7 +58,7 @@ def gas_data():
|
|
|
58
58
|
f.readline()
|
|
59
59
|
z = np.fromiter(
|
|
60
60
|
(float(v) for v in f.readline().rstrip().split()),
|
|
61
|
-
np.
|
|
61
|
+
np.float64)
|
|
62
62
|
results.append(z)
|
|
63
63
|
return (E, NOx, gas_fit_E, newdata, alpha, results)
|
|
64
64
|
|
|
@@ -35,7 +35,12 @@ print(incdir)
|
|
|
35
35
|
check: true
|
|
36
36
|
).stdout().strip()
|
|
37
37
|
inc_np = include_directories(incdir_numpy)
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
# Don't use the deprecated NumPy C API. Define this to a fixed version instead of
|
|
40
|
+
# NPY_API_VERSION in order not to break compilation for released SciPy versions
|
|
41
|
+
# when NumPy introduces a new deprecation.
|
|
42
|
+
numpy_nodepr_api = ['-DNPY_NO_DEPRECATED_API=NPY_1_9_API_VERSION']
|
|
43
|
+
np_dep = declare_dependency(include_directories: inc_np, compile_args: numpy_nodepr_api)
|
|
39
44
|
|
|
40
45
|
# We do need an absolute path to feed to `cc.find_library` below
|
|
41
46
|
_incdir_numpy_abs = run_command(py,
|
|
@@ -47,17 +52,6 @@ npymath_path = _incdir_numpy_abs / '..' / 'lib'
|
|
|
47
52
|
npyrandom_path = _incdir_numpy_abs / '..' / '..' / 'random' / 'lib'
|
|
48
53
|
npymath_lib = cc.find_library('npymath', dirs: npymath_path)
|
|
49
54
|
npyrandom_lib = cc.find_library('npyrandom', dirs: npyrandom_path)
|
|
50
|
-
|
|
51
|
-
# Don't use the deprecated NumPy C API. Define this to a fixed version instead of
|
|
52
|
-
# NPY_API_VERSION in order not to break compilation for released SciPy versions
|
|
53
|
-
# when NumPy introduces a new deprecation. Use in a meson.build file
|
|
54
|
-
#
|
|
55
|
-
# py.extension_module('_name',
|
|
56
|
-
# 'source_fname',
|
|
57
|
-
# numpy_nodepr_api)
|
|
58
|
-
|
|
59
|
-
# numpy_nodepr_api = '-DNPY_NO_DEPRECATED_API=NPY_1_9_API_VERSION'
|
|
60
|
-
numpy_nodepr_api = '-DNPY_NO_DEPRECATED_API=1'
|
|
61
55
|
###
|
|
62
56
|
|
|
63
57
|
#### Check Supported Compiler Flags
|
|
@@ -81,6 +75,7 @@ Wno_empty_body = cc.get_supported_arguments('-Wno-empty-body')
|
|
|
81
75
|
Wno_implicit_function_declaration = cc.get_supported_arguments('-Wno-implicit-function-declaration')
|
|
82
76
|
Wno_parentheses = cc.get_supported_arguments('-Wno-parentheses')
|
|
83
77
|
Wno_switch = cc.get_supported_arguments('-Wno-switch')
|
|
78
|
+
Wno_unused_result = cc.get_supported_arguments('-Wno-unused-result')
|
|
84
79
|
Wno_unused_label = cc.get_supported_arguments('-Wno-unused-label')
|
|
85
80
|
Wno_unused_variable = cc.get_supported_arguments('-Wno-unused-variable')
|
|
86
81
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
|
|
3
|
+
# This script makes it easy to recompile install and tryout
|
|
4
|
+
# a theme in case of any changes. It assumes the
|
|
5
|
+
# sphinx-bootstrap-theme-customizer package is in the same directory
|
|
6
|
+
# as the package, i.e one up the git toplevel.
|
|
7
|
+
|
|
8
|
+
color5=$(tput setaf 5)
|
|
9
|
+
reset=$(tput sgr0) # reset color codes
|
|
10
|
+
|
|
11
|
+
toplevel=$(git rev-parse --show-toplevel)
|
|
12
|
+
bootstrap=$(basename $(ls -d theme/static/bootstrap-*/))
|
|
13
|
+
|
|
14
|
+
# Compile theme
|
|
15
|
+
cd $toplevel/../sphinx-bootstrap-theme-customizer/
|
|
16
|
+
./build "$@"
|
|
17
|
+
|
|
18
|
+
# Copy theme for sphinx to use
|
|
19
|
+
rm -rf $toplevel/doc/theme
|
|
20
|
+
cp -rf theme $toplevel/doc
|
|
21
|
+
|
|
22
|
+
# Do a hotswap (it may be enough for us to see the results compared to
|
|
23
|
+
# regenerating the html)
|
|
24
|
+
|
|
25
|
+
cd $toplevel
|
|
26
|
+
mkdir -p doc/_build/html/_static/$bootstrap/css
|
|
27
|
+
cp $toplevel/doc/{theme/static,_build/html/_static}/$bootstrap/css/bootstrap.min.css
|
|
28
|
+
|
|
29
|
+
echo "${color5}success${reset}"
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Auto-deploy sphinx documentation with Github Actions
|
|
4
|
+
# Credit: https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
|
|
5
|
+
set -o xtrace # Print command traces before executing command
|
|
6
|
+
set -e # Exit with nonzero exit code if anything fails
|
|
7
|
+
echo $BASH_VERSION # For debugging
|
|
8
|
+
|
|
9
|
+
# Setup variables
|
|
10
|
+
COMMIT_AUTHOR_NAME="Github Actions"
|
|
11
|
+
COMMIT_AUTHOR_EMAIL="github-actions@github.com"
|
|
12
|
+
release_re='[0-9]\+\.[0-9]\+\.[0-9]\+'
|
|
13
|
+
pre_re='\(\(a\|b\|rc\|alpha\|beta\)[0-9]*\)\?'
|
|
14
|
+
VERSION=$(echo $SOURCE_TAG | grep "^v${release_re}${pre_re}$") || VERSION=""
|
|
15
|
+
RELEASE_VERSION=$(echo $SOURCE_TAG | grep "^v${release_re}$") || RELEASE_VERSION=""
|
|
16
|
+
DEST_DIR=""
|
|
17
|
+
NEW_RELEASE="No"
|
|
18
|
+
|
|
19
|
+
# dev, latest, stable, v1.0.0
|
|
20
|
+
if [[ "$SOURCE_BRANCH" == "main" ]]; then
|
|
21
|
+
DEST_DIR="latest"
|
|
22
|
+
elif [[ "$SOURCE_BRANCH" == "dev" ]]; then
|
|
23
|
+
DEST_DIR="dev"
|
|
24
|
+
elif [[ "${SOURCE_BRANCH:0:11}" == "refs/tags/v" ]]; then
|
|
25
|
+
if [[ "$RELEASE_VERSION" ]]; then
|
|
26
|
+
DEST_DIR="$RELEASE_VERSION"
|
|
27
|
+
fi
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# A release (tag) without a corresponding directory entry means we
|
|
31
|
+
# are seeing it for the first time.
|
|
32
|
+
if [[ "$DEST_DIR" == "$RELEASE_VERSION" ]] && [[ ! -d "$DEST_DIR" ]]; then
|
|
33
|
+
NEW_RELEASE="Yes"
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# Do not deploy if destination directory has been created at this point.
|
|
37
|
+
# If the destination directory exists clear it out
|
|
38
|
+
# Otherwise we create it
|
|
39
|
+
if [[ -z "$DEST_DIR" ]]; then
|
|
40
|
+
echo "Nothing to deploy."; exit 0
|
|
41
|
+
elif [[ -d "$DEST_DIR" ]]; then
|
|
42
|
+
rm -f "$DEST_DIR/*"
|
|
43
|
+
else
|
|
44
|
+
mkdir -p $DEST_DIR
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# Copy documentation
|
|
48
|
+
touch .nojekyll
|
|
49
|
+
cp -a "$HTML_DIR/." $DEST_DIR
|
|
50
|
+
|
|
51
|
+
# A new release becomes the stable version
|
|
52
|
+
# and also becomes the latest
|
|
53
|
+
if [[ "$NEW_RELEASE" == "Yes" ]]; then
|
|
54
|
+
rm stable
|
|
55
|
+
|
|
56
|
+
ln -s "$DEST_DIR" stable
|
|
57
|
+
|
|
58
|
+
rm -rf latest
|
|
59
|
+
ln -sf $DEST_DIR latest
|
|
60
|
+
|
|
61
|
+
# For debugging
|
|
62
|
+
ls -la
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
COMMIT_MSG="Documentation: ${DEST_DIR}"
|
|
66
|
+
|
|
67
|
+
# Configure commit information
|
|
68
|
+
git config user.name "$COMMIT_AUTHOR_NAME"
|
|
69
|
+
git config user.email "$COMMIT_AUTHOR_EMAIL"
|
|
70
|
+
|
|
71
|
+
# Commit the "changes", i.e. the new version.
|
|
72
|
+
# The delta will show diffs between new and old versions.
|
|
73
|
+
git add "$DEST_DIR"
|
|
74
|
+
git add stable
|
|
75
|
+
git add latest
|
|
76
|
+
|
|
77
|
+
changes=$(git diff --cached --shortstat)
|
|
78
|
+
if [[ -z "$changes" ]]; then
|
|
79
|
+
echo "No changes to the output on this push; exiting."
|
|
80
|
+
exit 0
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
git commit -m "$COMMIT_MSG"
|
|
84
|
+
git push
|