aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-11-27 08:31:00 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-11-27 08:40:39 +0300
commitaef70c15939a1fa89935914b733f13936c45f19d (patch)
tree029a0f596262c0eb212abeffd14cca67c270b0a0
parent40f133ee2bbedc81d314e9804f0a39910489a3e6 (diff)
downloadydb-aef70c15939a1fa89935914b733f13936c45f19d.tar.gz
Intermediate changes
commit_hash:021a1111fd99e9a49c82003d252a68932f4db9f0
-rw-r--r--contrib/python/contourpy/.dist-info/METADATA72
-rw-r--r--contrib/python/contourpy/contourpy/_contourpy.pyi3
-rw-r--r--contrib/python/contourpy/contourpy/_version.py2
-rw-r--r--contrib/python/contourpy/contourpy/array.py4
-rw-r--r--contrib/python/contourpy/contourpy/convert.py3
-rw-r--r--contrib/python/contourpy/contourpy/util/bokeh_renderer.py7
-rw-r--r--contrib/python/contourpy/contourpy/util/mpl_renderer.py3
-rw-r--r--contrib/python/contourpy/contourpy/util/mpl_util.py3
-rw-r--r--contrib/python/contourpy/ya.make2
9 files changed, 51 insertions, 48 deletions
diff --git a/contrib/python/contourpy/.dist-info/METADATA b/contrib/python/contourpy/.dist-info/METADATA
index 55e5c6d8e0..fa2550faea 100644
--- a/contrib/python/contourpy/.dist-info/METADATA
+++ b/contrib/python/contourpy/.dist-info/METADATA
@@ -1,44 +1,44 @@
Metadata-Version: 2.1
Name: contourpy
-Version: 1.3.0
+Version: 1.3.1
Summary: Python library for calculating contours of 2D quadrilateral grids
Author-Email: Ian Thomas <ianthomas23@gmail.com>
License: BSD 3-Clause License
-
- Copyright (c) 2021-2024, ContourPy Developers.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Copyright (c) 2021-2024, ContourPy Developers.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
@@ -50,30 +50,30 @@ Project-URL: Homepage, https://github.com/contourpy/contourpy
Project-URL: Changelog, https://contourpy.readthedocs.io/en/latest/changelog.html
Project-URL: Documentation, https://contourpy.readthedocs.io
Project-URL: Repository, https://github.com/contourpy/contourpy
-Requires-Python: >=3.9
+Requires-Python: >=3.10
Requires-Dist: numpy>=1.23
+Provides-Extra: docs
Requires-Dist: furo; extra == "docs"
Requires-Dist: sphinx>=7.2; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
+Provides-Extra: bokeh
Requires-Dist: bokeh; extra == "bokeh"
Requires-Dist: selenium; extra == "bokeh"
+Provides-Extra: mypy
Requires-Dist: contourpy[bokeh,docs]; extra == "mypy"
Requires-Dist: docutils-stubs; extra == "mypy"
Requires-Dist: mypy==1.11.1; extra == "mypy"
Requires-Dist: types-Pillow; extra == "mypy"
+Provides-Extra: test
Requires-Dist: contourpy[test-no-images]; extra == "test"
Requires-Dist: matplotlib; extra == "test"
Requires-Dist: Pillow; extra == "test"
+Provides-Extra: test-no-images
Requires-Dist: pytest; extra == "test-no-images"
Requires-Dist: pytest-cov; extra == "test-no-images"
Requires-Dist: pytest-rerunfailures; extra == "test-no-images"
Requires-Dist: pytest-xdist; extra == "test-no-images"
Requires-Dist: wurlitzer; extra == "test-no-images"
-Provides-Extra: docs
-Provides-Extra: bokeh
-Provides-Extra: mypy
-Provides-Extra: test
-Provides-Extra: test-no-images
Description-Content-Type: text/markdown
<img alt="ContourPy" src="https://raw.githubusercontent.com/contourpy/contourpy/main/docs/_static/contourpy_logo_horiz.svg" height="90">
diff --git a/contrib/python/contourpy/contourpy/_contourpy.pyi b/contrib/python/contourpy/contourpy/_contourpy.pyi
index c79cf8251a..5f44eace52 100644
--- a/contrib/python/contourpy/contourpy/_contourpy.pyi
+++ b/contrib/python/contourpy/contourpy/_contourpy.pyi
@@ -1,8 +1,7 @@
-from typing import ClassVar, NoReturn
+from typing import ClassVar, NoReturn, TypeAlias
import numpy as np
import numpy.typing as npt
-from typing_extensions import TypeAlias
import contourpy._contourpy as cpy
diff --git a/contrib/python/contourpy/contourpy/_version.py b/contrib/python/contourpy/contourpy/_version.py
index 67bc602abf..9c73af26be 100644
--- a/contrib/python/contourpy/contourpy/_version.py
+++ b/contrib/python/contourpy/contourpy/_version.py
@@ -1 +1 @@
-__version__ = "1.3.0"
+__version__ = "1.3.1"
diff --git a/contrib/python/contourpy/contourpy/array.py b/contrib/python/contourpy/contourpy/array.py
index 5b41fb2589..a7054fae1d 100644
--- a/contrib/python/contourpy/contourpy/array.py
+++ b/contrib/python/contourpy/contourpy/array.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from itertools import chain
+from itertools import chain, pairwise
from typing import TYPE_CHECKING
import numpy as np
@@ -258,4 +258,4 @@ def split_points_at_nan(points: cpy.PointArray) -> list[cpy.PointArray]:
return [points]
else:
nan_offsets = np.concatenate(([-1], nan_offsets, [len(points)]))
- return [points[s+1:e] for s, e in zip(nan_offsets[:-1], nan_offsets[1:])]
+ return [points[s+1:e] for s, e in pairwise(nan_offsets)]
diff --git a/contrib/python/contourpy/contourpy/convert.py b/contrib/python/contourpy/contourpy/convert.py
index 92adbbb5b6..ebdb1af8bf 100644
--- a/contrib/python/contourpy/contourpy/convert.py
+++ b/contrib/python/contourpy/contourpy/convert.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+from itertools import pairwise
from typing import TYPE_CHECKING, cast
import numpy as np
@@ -212,7 +213,7 @@ def _convert_filled_from_ChunkCombinedOffsetOffset(
assert outer_offsets is not None
if len(outer_offsets) > 2:
separate_offsets += [offsets[s:e+1] - offsets[s] for s, e in
- zip(outer_offsets[:-1], outer_offsets[1:])]
+ pairwise(outer_offsets)]
else:
separate_offsets.append(offsets)
separate_points += arr.split_points_by_offsets(points, offsets[outer_offsets])
diff --git a/contrib/python/contourpy/contourpy/util/bokeh_renderer.py b/contrib/python/contourpy/contourpy/util/bokeh_renderer.py
index a8a10e8ad3..e20dc9cfe5 100644
--- a/contrib/python/contourpy/contourpy/util/bokeh_renderer.py
+++ b/contrib/python/contourpy/contourpy/util/bokeh_renderer.py
@@ -162,8 +162,9 @@ class BokehRenderer(Renderer):
list(np.stack((y[:-1, 1:].ravel(), ymid, y[1:, :-1].ravel()), axis=1)),
**kwargs)
if point_color is not None:
- fig.circle(
- x=x.ravel(), y=y.ravel(), fill_color=color, line_color=None, alpha=alpha, size=8)
+ fig.scatter(
+ x=x.ravel(), y=y.ravel(), fill_color=color, line_color=None, alpha=alpha,
+ marker="circle", size=8)
def lines(
self,
@@ -221,7 +222,7 @@ class BokehRenderer(Renderer):
fig = self._get_figure(ax)
color = self._convert_color(color)
x, y = self._grid_as_2d(x, y)
- fig.circle(x[mask], y[mask], fill_color=color, size=10)
+ fig.scatter(x[mask], y[mask], fill_color=color, marker="circle", size=10)
def save(
self,
diff --git a/contrib/python/contourpy/contourpy/util/mpl_renderer.py b/contrib/python/contourpy/contourpy/util/mpl_renderer.py
index e078ca28f7..401c9056ff 100644
--- a/contrib/python/contourpy/contourpy/util/mpl_renderer.py
+++ b/contrib/python/contourpy/contourpy/util/mpl_renderer.py
@@ -1,6 +1,7 @@
from __future__ import annotations
import io
+from itertools import pairwise
from typing import TYPE_CHECKING, Any, cast
import matplotlib.collections as mcollections
@@ -404,7 +405,7 @@ class MplDebugRenderer(MplRenderer):
for points, offsets in zip(*filled):
if points is None:
continue
- for start, end in zip(offsets[:-1], offsets[1:]):
+ for start, end in pairwise(offsets):
xys = points[start:end]
ax.plot(xys[:, 0], xys[:, 1], c=line_color, alpha=line_alpha)
diff --git a/contrib/python/contourpy/contourpy/util/mpl_util.py b/contrib/python/contourpy/contourpy/util/mpl_util.py
index 10a2ccdb23..d8587798c4 100644
--- a/contrib/python/contourpy/contourpy/util/mpl_util.py
+++ b/contrib/python/contourpy/contourpy/util/mpl_util.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+from itertools import pairwise
from typing import TYPE_CHECKING, cast
import matplotlib.path as mpath
@@ -67,7 +68,7 @@ def lines_to_mpl_paths(lines: LineReturn, line_type: LineType) -> list[mpath.Pat
continue
nan_offsets = np.nonzero(np.isnan(points[:, 0]))[0]
nan_offsets = np.concatenate([[-1], nan_offsets, [len(points)]])
- for s, e in zip(nan_offsets[:-1], nan_offsets[1:]):
+ for s, e in pairwise(nan_offsets):
line = points[s+1:e]
closed = line[0, 0] == line[-1, 0] and line[0, 1] == line[-1, 1]
paths.append(mpath.Path(line, closed=closed))
diff --git a/contrib/python/contourpy/ya.make b/contrib/python/contourpy/ya.make
index 7c9cf3ac75..ef656cef3d 100644
--- a/contrib/python/contourpy/ya.make
+++ b/contrib/python/contourpy/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(1.3.0)
+VERSION(1.3.1)
LICENSE(BSD-3-Clause)