Skip to content

Commit 737e0f4

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 543ffbd + df4082d commit 737e0f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spectral/image.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ def __getitem__(self, args):
118118
def _parent_getitem(self, args):
119119
return np.ndarray.__getitem__(self, args)
120120

121-
def read_band(self, i):
121+
def read_band(self, band):
122122
'''
123123
For compatibility with SpyFile objects. Returns arr[:,:,i].squeeze()
124124
'''
125-
return np.asarray(self[:, :, i].squeeze())
125+
return np.asarray(self[:, :, band].squeeze())
126126

127127
def read_bands(self, bands):
128128
'''For SpyFile compatibility. Equivlalent to arr.take(bands, 2)'''
@@ -161,7 +161,7 @@ def read_subimage(self, rows, cols, bands=None):
161161

162162
def read_datum(self, i, j, k):
163163
'''For SpyFile compatibility. Equivlalent to arr[i, j, k]'''
164-
return np.asscalar(self[i, j, k])
164+
return self[i, j, k]
165165

166166
def load(self):
167167
'''For compatibility with SpyFile objects. Returns self'''

0 commit comments

Comments
 (0)