summaryrefslogtreecommitdiff
path: root/examples/viewer3DVolume.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/viewer3DVolume.py')
-rw-r--r--examples/viewer3DVolume.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/viewer3DVolume.py b/examples/viewer3DVolume.py
index 4de04f6..2193402 100644
--- a/examples/viewer3DVolume.py
+++ b/examples/viewer3DVolume.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2016-2020 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -74,7 +74,7 @@ def load(filename):
filename, path = filename.split('::')
path, indices = path.split('#')[0], path.split('#')[1:]
- with h5py.File(filename) as f:
+ with h5py.File(filename, mode='r') as f:
data = f[path]
# Loop through indices along first dimensions