diff --git a/pylibdmtx/pylibdmtx.py b/pylibdmtx/pylibdmtx.py
index <HASH>..<HASH> 100644
--- a/pylibdmtx/pylibdmtx.py
+++ b/pylibdmtx/pylibdmtx.py
@@ -195,7 +195,12 @@ def decode(image, timeout=None, gap_size=None, shrink=1, shape=None,
     elif 'numpy.ndarray' in str(type(image)):
         if 'uint8' != str(image.dtype):
             image = image.astype('uint8')
-        pixels = image.tobytes()
+        try:
+            pixels = image.tobytes()
+        except AttributeError:
+            # `numpy.ndarray.tobytes()` introduced in `numpy` 1.9.0 - use the
+            # older `tostring` method.
+            pixels = image.tostring()
         height, width = image.shape[:2]
     else:
         # image should be a tuple (pixels, width, height)
[#9] Reinstate numpy version check