Skip to content

Commit d198ce6

Browse files
committed
Merge pull request #9 from colour-science/master
Ensure example resources can be loaded.
2 parents c6e241c + 4732324 commit d198ce6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pycam02ucs/cm/viscm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,16 @@ def toggle(*args):
303303

304304
images = []
305305
image_args = []
306-
example_dir = os.path.dirname(__file__) + "/examples/"
306+
example_dir = os.path.join(os.path.dirname(__file__), "examples")
307307

308-
images.append(np.loadtxt(example_dir + "hist2d.txt"))
308+
images.append(np.loadtxt(os.path.join(example_dir, "hist2d.txt")))
309309
image_args.append({"aspect": "equal",
310310
"origin": "lower",
311311
"interpolation": "nearest",
312312
"vmin": 0})
313313

314-
images.append(np.loadtxt(example_dir
315-
+ "st-helens_before-modified.txt.gz").T)
314+
images.append(np.loadtxt(os.path.join(example_dir,
315+
"st-helens_before-modified.txt.gz")).T)
316316
image_args.append({})
317317

318318
# Adapted from http://matplotlib.org/mpl_examples/images_contours_and_fields/pcolormesh_levels.py

0 commit comments

Comments
 (0)