Skip to content

Commit

Permalink
BUG: adapt to numpy > 1.8
Browse files Browse the repository at this point in the history
np.diag is not writeable in recent numpy versions
  • Loading branch information
GaelVaroquaux committed Mar 11, 2014
1 parent 83668cb commit 548f089
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nipy/labs/datasets/volumes/volume_img.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def xyz_ordered(self, resample=False, copy=True):
axis_numbers = np.argmax(np.abs(A), axis=0)

# Now make sure the affine is positive
pixdim = np.diag(A)
pixdim = np.diag(A).copy()
data = img.get_data()
if pixdim[0] < 0:
b[0] = b[0] + pixdim[0]*(data.shape[0] - 1)
Expand Down

0 comments on commit 548f089

Please sign in to comment.