summaryrefslogtreecommitdiff
path: root/silx/sx/_plot.py
diff options
context:
space:
mode:
authorAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2019-07-09 10:20:20 +0200
committerAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2019-07-09 10:20:20 +0200
commit654a6ac93513c3cc1ef97cacd782ff674c6f4559 (patch)
tree3b986e4972de7c57fa465820367602fc34bcb0d3 /silx/sx/_plot.py
parenta763e5d1b3921b3194f3d4e94ab9de3fbe08bbdd (diff)
New upstream version 0.11.0+dfsg
Diffstat (limited to 'silx/sx/_plot.py')
-rw-r--r--silx/sx/_plot.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/silx/sx/_plot.py b/silx/sx/_plot.py
index 00dcabe..1da44ab 100644
--- a/silx/sx/_plot.py
+++ b/silx/sx/_plot.py
@@ -31,6 +31,10 @@ __date__ = "06/11/2018"
import collections
+try:
+ from collections import abc
+except ImportError: # Python2 support
+ import collections as abc
import logging
import weakref
@@ -362,7 +366,7 @@ def scatter(x=None, y=None, value=None, size=None,
if value is None:
value = numpy.ones(len(x), dtype=numpy.float32)
- elif isinstance(value, collections.Iterable):
+ elif isinstance(value, abc.Iterable):
value = numpy.array(value, copy=True).reshape(-1)
assert len(x) == len(value)
@@ -400,7 +404,7 @@ class _GInputResult(tuple):
def __init__(self, position, item, indices, data):
self._itemRef = weakref.ref(item) if item is not None else None
self._indices = numpy.array(indices, copy=True)
- if isinstance(data, collections.Iterable):
+ if isinstance(data, abc.Iterable):
self._data = numpy.array(data, copy=True)
else:
self._data = data