Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
fixed % and added rms

Co-authored-by: Chris Markiewicz <[email protected]>
  • Loading branch information
bendhouseart and effigies committed May 10, 2024
1 parent c3b4d66 commit 0e3422c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ecat_testing/read_matlab_nii.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ def first_middle_last_frames_to_text(four_d_array_like_object, output_folder, st
path_to_python_nii = pathlib.Path('python_nii.nii.gz')


python_nii = nibabel.load(str(path_to_python_nii))
matlab_nii = nibabel.load(str(path_to_matlab_nii))
python_nii = nibabel.load(path_to_python_nii)
matlab_nii = nibabel.load(path_to_matlab_nii)

python_data = python_nii.get_fdata()
matlab_data = matlab_nii.get_fdata()

# compare the two arrays in each
print(numpy.allclose(python_data, matlab_data, rtol=0.5))
print(numpy.allclose(python_data, matlab_data, rtol=0.01))


# subtract the two arrays
Expand Down

0 comments on commit 0e3422c

Please sign in to comment.