From 42830c416e147bfe828863b2eb7fa12940ca2ad5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 29 Apr 2024 21:15:28 -0400 Subject: [PATCH] util/view-mri-data.py: update for python3 --- util/view-mri-data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/view-mri-data.py b/util/view-mri-data.py index 96fbfa5..62ae9b7 100755 --- a/util/view-mri-data.py +++ b/util/view-mri-data.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python3 """ Display volumetric data from the Stanford Volume Data Archive. The @@ -11,7 +11,7 @@ import sys def usage(): binary = sys.argv[0] - print "Usage:", binary, "" + print(f"Usage: {binary} ") if len(sys.argv) < 2: usage() @@ -34,7 +34,7 @@ import numpy as np data = np.fromfile(sys.argv[1], dtype='>u2') original_data_length = 7143424 -multiplier = cube_root(len(data) / original_data_length) +multiplier = cube_root(len(data) // original_data_length) data.shape = (109*multiplier, 256*multiplier, 256*multiplier) data = data.T -- 2.44.2