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

Bump required C++ standard to c++17#27012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
WeatherGod merged 1 commit intomatplotlib:mainfromQuLogic:cpp17
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletionsdoc/api/next_api_changes/development/27012-ES.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
Extensions require C++17
~~~~~~~~~~~~~~~~~~~~~~~~

Matplotlib now requires a compiler that supports C++17 in order to build its extensions.
According to `SciPy's analysis
<https://docs.scipy.org/doc/scipy/dev/toolchain.html#c-language-standards>`_, this
should be available on all supported platforms.
14 changes: 7 additions & 7 deletionsdoc/devel/dependencies.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -233,7 +233,7 @@ in your target environment manually:
C++ compiler
------------

Matplotlib requires a C++ compiler that supports C++11, and each platform has a
Matplotlib requires a C++ compiler that supports C++17, and each platform has a
development environment that must be installed before a compiler can be installed.

.. tab-set::
Expand DownExpand Up@@ -277,18 +277,18 @@ Xcode, VS Code or Linux package manager. Choose **one** compiler from this list:
- platforms
- notes
* - GCC
- **4.8.1**
- **7.2**
- Linux, macOS, Windows
- `gcc4.8.1 <https://gcc.gnu.org/projects/cxx-status.html#cxx11>`_,
- `gcc7.2 <https://gcc.gnu.org/projects/cxx-status.html#cxx17>`_,
`GCC: Binaries <https://gcc.gnu.org/install/binaries.html>`_,
* - Clang (LLVM)
- **3.3**
- **5**
- Linux, macOS
- `clang3.3 <https://clang.llvm.org/cxx_status.html>`_, `LLVM <https://releases.llvm.org/download.html>`_
- `clang5 <https://clang.llvm.org/cxx_status.html>`_, `LLVM <https://releases.llvm.org/download.html>`_
* - MSVC++
- **14.0**
- **16.0**
- Windows
- `Visual Studio2015 C++ <https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-140>`_
- `Visual Studio2019 C++ <https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160>`_



Expand Down
2 changes: 1 addition & 1 deletionmeson.build
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@ project(
meson_version:'>=1.1.0',
default_options: [
'b_lto=true',
'cpp_std=c++11',
'cpp_std=c++17',
'auto_features=disabled',# Force FreeType to avoid extra dependencies.
],
)
Expand Down
51 changes: 25 additions & 26 deletionssrc/_image_wrapper.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,41 +10,40 @@
* */

const char* image_resample__doc__ =
"Resample input_array, blending it in-place into output_array, using an\n"
"affine transformation.\n\n"
R"""(Resample input_array, blending it in-place into output_array, using an affine transform.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

extraneous paren

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

No, this is C++11 raw string literal syntax; it'sR"<something>(...)<something>" where<something> is an optional string to prevent ambiguity if your string might contain)". I chose additional double quotes to make it look similar to a Python multiline string, but if that is confusing a different string could be chosen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oh! Yes, it is! Actually, let's keep it this way. I just haven't encountered it enough to recognize it for what it was.


"Parameters\n"
"----------\n"
"input_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`\n"
" If 2-d, the image is grayscale. If 3-d, the image must be of size\n"
"4 in the lastdimension and represents RGBA data.\n\n"
Parameters
----------
input_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`
If 2-d, the image is grayscale. If 3-d, the image must be of size 4 in the last
dimension and represents RGBA data.

"output_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`\n"
" The dtype and number of dimensions must match `input_array`.\n\n"
output_array : 2-d or 3-d NumPy array of float, double or `numpy.uint8`
The dtype and number of dimensions must match `input_array`.

"transform : matplotlib.transforms.Transform instance\n"
" The transformation from the input array to the output array.\n\n"
transform : matplotlib.transforms.Transform instance
The transformation from the input array to the output array.

"interpolation : int, default: NEAREST\n"
" The interpolation method. Must be one of the following constants\n"
"defined in thismodule:\n\n"
interpolation : int, default: NEAREST
The interpolation method. Must be one of the following constants defined in this
module:

" NEAREST, BILINEAR, BICUBIC, SPLINE16, SPLINE36,\n"
" HANNING, HAMMING, HERMITE, KAISER, QUADRIC, CATROM, GAUSSIAN,\n"
" BESSEL, MITCHELL, SINC, LANCZOS, BLACKMAN\n\n"
NEAREST, BILINEAR, BICUBIC, SPLINE16, SPLINE36, HANNING, HAMMING, HERMITE, KAISER,
QUADRIC, CATROM, GAUSSIAN, BESSEL, MITCHELL, SINC, LANCZOS, BLACKMAN

"resample : bool, optional\n"
" When `True`, use a full resampling method. When `False`, only\n"
"resample when theoutput image is larger than the input image.\n\n"
resample : bool, optional
When `True`, use a full resampling method. When `False`, only resample when the
output image is larger than the input image.

"alpha : float, default: 1\n"
" The transparency level, from 0 (transparent) to 1 (opaque).\n\n"
alpha : float, default: 1
The transparency level, from 0 (transparent) to 1 (opaque).

"norm : bool, default: False\n"
" Whether to norm the interpolation function.\n\n"
norm : bool, default: False
Whether to norm the interpolation function.

"radius: float, default: 1\n"
" The radius of the kernel, if method is SINC, LANCZOS or BLACKMAN.\n";
radius: float, default: 1
The radius of the kernel, if method is SINC, LANCZOS or BLACKMAN.
)""";


static pybind11::array_t<double>
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp