Skip to content

Commit

Permalink
Merge pull request #1330 from jhlegarreta/PreferVstack
Browse files Browse the repository at this point in the history
RF: Prefer using `np.vstack` instead of `np.row_stack`
  • Loading branch information
effigies authored Jun 27, 2024
2 parents 8fb25a0 + 17809b0 commit 0da8c1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nibabel/brikhead.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def get_affine(self):
# AFNI default is RAI- == LPS+ == DICOM order. We need to flip RA sign
# to align with nibabel RAS+ system
affine = np.asarray(self.info['IJK_TO_DICOM_REAL']).reshape(3, 4)
affine = np.row_stack((affine * [[-1], [-1], [1]], [0, 0, 0, 1]))
affine = np.vstack((affine * [[-1], [-1], [1]], [0, 0, 0, 1]))
return affine

def get_data_scaling(self):
Expand Down
2 changes: 1 addition & 1 deletion nibabel/ecat.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def read_mlist(fileobj, endianness):
mlist_index += n_rows
if mlist_block_no <= 2: # should block_no in (1, 2) be an error?
break
return np.row_stack(mlists)
return np.vstack(mlists)


def get_frame_order(mlist):
Expand Down

0 comments on commit 0da8c1c

Please sign in to comment.