Skip to content

Commit f1c76fb

Browse files
committed
Fixes #4: another plotpy V1 regression
1 parent c812744 commit f1c76fb

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
],
2525
"[python]": {
2626
"editor.codeActionsOnSave": {
27-
"source.organizeImports": true
27+
"source.organizeImports": "explicit"
2828
},
2929
"editor.defaultFormatter": "ms-python.black-formatter"
3030
},

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog #
22

3+
## Version 2.0.2 ##
4+
5+
🛠️ Bug fixes:
6+
7+
* [Issue #4](https://github.com/PlotPyStack/PlotPy/issues/4) - Average cross section: `RuntimeWarning: Mean of empty slice.`
8+
39
## Version 2.0.1 ##
410

511
🛠️ Bug fixes:

plotpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
.. _GitHub: https://github.com/PierreRaybaut/plotpy
2121
"""
2222

23-
__version__ = "2.0.1"
23+
__version__ = "2.0.2"
2424
__VERSION__ = tuple([int(number) for number in __version__.split(".")])
2525

2626
# --- Important note: DATAPATH and LOCALEPATH are used by guidata.configtools

plotpy/panels/csection/csitem.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,6 @@ def update_curve_data(self, obj):
311311
sectx, secty = self.get_cross_section(obj)
312312
if secty.size == 0 or np.all(np.isnan(secty)):
313313
sectx, secty = np.array([]), np.array([])
314-
elif self.param.curvestyle != "Steps":
315-
# Center the symbols at the middle of pixels
316-
# Bugfix, we deactivate warnings only for numpy method call.
317-
# (V1.0.10 => V1.0.11)
318-
# Deactivate following warnings after 20210218 mail
319-
# warnings.filterwarnings('ignore')
320-
sectx[:-1] += np.mean(np.diff(sectx) / 2)
321-
# warnings.filterwarnings('default')
322314
if self.orientation() == QC.Qt.Orientation.Vertical:
323315
self.process_curve_data(secty, sectx)
324316
else:

0 commit comments

Comments
 (0)