Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite25ad06

Browse files
committed
Bump required C++ standard to c++17
According to SciPy's Toolchain Roadmap [1], C++17 core features becameavailable in 2022. This was concluded based on minimum compiler versionsin `manylinux2014` images, AIX systems, FreeBSD systems, and Windows.Note, some standard library features are not universally supported.This commit does not move much code to C++17, just a couple of minorimprovements that I could easily change.[1]https://docs.scipy.org/doc/scipy/dev/toolchain.html#c-language-standards
1 parentd9b3449 commite25ad06

File tree

3 files changed

+33
-27
lines changed

3 files changed

+33
-27
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Extensions require C++17
2+
~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
Matplotlib now requires a compiler that supports C++17 in order to build its extensions.
5+
According to `SciPy's analysis
6+
<https://docs.scipy.org/doc/scipy/dev/toolchain.html#c-language-standards>`_, this
7+
should be available on all supported platforms.

‎meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ project(
1010
meson_version:'>=1.1.0',
1111
default_options: [
1212
'b_lto=true',
13-
'cpp_std=c++11',
13+
'cpp_std=c++17',
1414
'auto_features=disabled',# Force FreeType to avoid extra dependencies.
1515
],
1616
)

‎src/_image_wrapper.cpp

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,40 @@
1010
**/
1111

1212
constchar* image_resample__doc__ =
13-
"Resample input_array, blending it in-place into output_array, using an\n"
14-
"affine transformation.\n\n"
13+
R"""(Resample input_array, blending it in-place into output_array, using an affine transform.
1514
16-
"Parameters\n"
17-
"----------\n"
18-
"input_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`\n"
19-
" If 2-d, the image is grayscale. If 3-d, the image must be of size\n"
20-
"4 in the lastdimension and represents RGBA data.\n\n"
15+
Parameters
16+
----------
17+
input_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`
18+
If 2-d, the image is grayscale. If 3-d, the image must be of size 4 in the last
19+
dimension and represents RGBA data.
2120
22-
"output_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`\n"
23-
" The dtype and number of dimensions must match `input_array`.\n\n"
21+
output_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`
22+
The dtype and number of dimensions must match `input_array`.
2423
25-
"transform : matplotlib.transforms.Transform instance\n"
26-
" The transformation from the input array to the output array.\n\n"
24+
transform : matplotlib.transforms.Transform instance
25+
The transformation from the input array to the output array.
2726
28-
"interpolation : int, default: NEAREST\n"
29-
" The interpolation method. Must be one of the following constants\n"
30-
"defined in thismodule:\n\n"
27+
interpolation : int, default: NEAREST
28+
The interpolation method. Must be one of the following constants defined in this
29+
module:
3130
32-
" NEAREST, BILINEAR, BICUBIC, SPLINE16, SPLINE36,\n"
33-
" HANNING, HAMMING, HERMITE, KAISER, QUADRIC, CATROM, GAUSSIAN,\n"
34-
" BESSEL, MITCHELL, SINC, LANCZOS, BLACKMAN\n\n"
31+
NEAREST, BILINEAR, BICUBIC, SPLINE16, SPLINE36, HANNING, HAMMING, HERMITE, KAISER,
32+
QUADRIC, CATROM, GAUSSIAN, BESSEL, MITCHELL, SINC, LANCZOS, BLACKMAN
3533
36-
"resample : bool, optional\n"
37-
" When `True`, use a full resampling method. When `False`, only\n"
38-
"resample when theoutput image is larger than the input image.\n\n"
34+
resample : bool, optional
35+
When `True`, use a full resampling method. When `False`, only resample when the
36+
output image is larger than the input image.
3937
40-
"alpha : float, default: 1\n"
41-
" The transparency level, from 0 (transparent) to 1 (opaque).\n\n"
38+
alpha : float, default: 1
39+
The transparency level, from 0 (transparent) to 1 (opaque).
4240
43-
"norm : bool, default: False\n"
44-
" Whether to norm the interpolation function.\n\n"
41+
norm : bool, default: False
42+
Whether to norm the interpolation function.
4543
46-
"radius: float, default: 1\n"
47-
" The radius of the kernel, if method is SINC, LANCZOS or BLACKMAN.\n";
44+
radius: float, default: 1
45+
The radius of the kernel, if method is SINC, LANCZOS or BLACKMAN.
46+
)""";
4847

4948

5049
static pybind11::array_t<double>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp